iPhone remote will later want to query by album. Instead of doing a
fulltext query, it uses a 64-bit hash of the album + album_artist. It
is not necessary to use the same hash algorithm that iTunes uses. The
important thing is that we can later respond to a query=('daap.songalbumid:xxx')
with this value.
iPhone Remote uses the following requests to get cover art for
songs and albums:
/databases/#/items/#/extra_data/artwork
/databases/#/groups/#/extra_data/artwork
For now, we will return the valid and correct response that we
have "No content". In the future, the real artwork could be
extracted and returned here.
Clients like Front Row expect video/<type> for video streaming, whereas iTunes
likes application/x-dmap-tagged when streaming audio.
Based on a patch by Ace Jones <ace.jones1@yahoo.com>.
iTunes 9 sends requests with a Request-URI like
daap://10.1.1.20:3689/server-info
The DAAP server expected the Request-URI to be just /server-info, and so
couldn't match the request to any handler.
In addition, evhttp would declare this request a proxy request which also
broke keep-alive handling resulting in the server closing the connection
after the reply. iTunes doesn't like that.
iTunes and Roku devices do not encode + as %2B in the query string and
do not encode space as + either in the query string (though at least the
Roku encode space as %20 everywhere). This needs to be worked around or
browse queries fail to parse because + was decoded as space when the query
really needs a + character.