Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
dacp [2010/08/02 17:59]
admin
dacp [2015/08/15 15:15] (current)
Line 16: Line 16:
  
 Then md5 Hash this byte array, and put it in upper case. This is now returned in a HTTP request to the client (so the client needs a HTTP server as well!) **/​pair?​pairingcode=CODE&​servicename=SERVERSERVICENAME**\\ Then md5 Hash this byte array, and put it in upper case. This is now returned in a HTTP request to the client (so the client needs a HTTP server as well!) **/​pair?​pairingcode=CODE&​servicename=SERVERSERVICENAME**\\
-Note the service name is the Server'​s hex string used in the bonjour service description.+Note the service name is the Server'​s hex string used in the bonjour service description.\\ 
 +\\ 
 +The client also generates this hash using the same method, and compares the results. If they match it sends a response giving another pairing guid. It can store the service name for future reference. The pairing process is complete and the login process begins.
  
 ==== Example _touch-able._tcp Bonjour Service Description ==== ==== Example _touch-able._tcp Bonjour Service Description ====
Line 47: Line 49:
 DvTy=iPod touch\\ DvTy=iPod touch\\
 ===== Login Process ===== ===== Login Process =====
 +The login process begins on the client. It looks up the service name it got from the pairing process and gets the address and port of the server. It then begins a HTTP request. The first request is /​server-info,​ to get basic server data. The next request is to /login, where it gives the pairing guid it gave in the pairing process, this allows the server to know the client has already completed the pairing process and gives it access. This is different to the login mechanism for DAAP, even though a lot of the commands are the same. I handle this in Telescope by allowing either a DAAP HTTP-Authentication login or a DACP login for DAAP commands, but only a DACP login for DACP commands that change things on the server (start stop music etc).\\ 
 +Once you've logged in you can do what you like, iTunes does the following: /databases, for a list of (only ever seen 1) databases on the server. then /​databases/<<​dbid>>/​containers (which may be called multiple times?!). See below for notes on this request.
 ===== Details of individual URLs ===== ===== Details of individual URLs =====
-==== /​databases/<<​dbid>>/​containers ====+=== /​databases/<<​dbid>>/​containers === 
 +DAAP/DACP\\
 This requests a list of every container in the database. This includes nested containers (such as those in folders). ​ However what makes this special is that it also needs to include the 2 extra containers. The Database container and the all music container.\\ This requests a list of every container in the database. This includes nested containers (such as those in folders). ​ However what makes this special is that it also needs to include the 2 extra containers. The Database container and the all music container.\\
 The database container is a special '​base'​ playlist that (presumably) includes everything available on the server. iTunes returns it as the first container in the list and **it contains the abpl=true tag**. This is important as the next step is for iTunes to ask for a list of things in this database with a songalbumid:​0 filter. I don't know what would have a songalbumid:​0 as iTunes always returns an empty list, so Telescope does too. iTunes also includes meds=0 (not editable). \\ The database container is a special '​base'​ playlist that (presumably) includes everything available on the server. iTunes returns it as the first container in the list and **it contains the abpl=true tag**. This is important as the next step is for iTunes to ask for a list of things in this database with a songalbumid:​0 filter. I don't know what would have a songalbumid:​0 as iTunes always returns an empty list, so Telescope does too. iTunes also includes meds=0 (not editable). \\
 The second playlist is an all music playlist. This represents the basic view in iTunes, and includes all music in the library (but not podcasts videos etc). Extra metadata included for this playlist: aeSP:1, aePS:6, meds:0 \\ The second playlist is an all music playlist. This represents the basic view in iTunes, and includes all music in the library (but not podcasts videos etc). Extra metadata included for this playlist: aeSP:1, aePS:6, meds:0 \\
-Containers that aren't in folders have mtco=0 (parent container id), other mtco=(miid of parent container).+Containers that aren't in folders have mtco=0 (parent container id), otherwise ​mtco=(miid of parent container). 
 + 
 +=== .../​containers/<<​id>>/​items === 
 +DAAP/​DACP\\ 
 +Requests a list of all items in a container (can also request all items from the database directly with /​databases/<<​dbid>>/​items ).\\
  
 === /​ctrl-int/​1/​cue?​command=<<>>&​query=<<>>&​index=<<>>​... === === /​ctrl-int/​1/​cue?​command=<<>>&​query=<<>>&​index=<<>>​... ===
 This is a type of play command. A list of songs is generated by applying the ''​query''​ parameter to the database, then this is played (if ''​command''​ = play) starting at position ''​index''​ (0-based). Note index is a single number (e.g. index=1), not a range like in requests for lists. Further parameters may be included to set other properties. This is a type of play command. A list of songs is generated by applying the ''​query''​ parameter to the database, then this is played (if ''​command''​ = play) starting at position ''​index''​ (0-based). Note index is a single number (e.g. index=1), not a range like in requests for lists. Further parameters may be included to set other properties.
  
-=== /​ctrl-int/​1/​playspec ​===+=== /​ctrl-int/​1/​items === 
 +**Not in iTunes, Songbird Telescope plugin only**\\ 
 +returns a list of items that are in the currently playing playlist. Same response as a standard ''​container/<<​id>>/​items''​ request.