jasonmc / forked-daapd

A re-write of the firefly media server (mt-daapd). It's released under GPLv2+. Please note that this git repository is a mirror of the official one at git://git.debian.org/~jblache/forked-daapd.git
http://blog.technologeek.org/2009/06/12/217
GNU General Public License v2.0
328 stars 45 forks source link

iTunes is confused - wrong tracks listed against albums, artists #49

Closed stormcock closed 13 years ago

stormcock commented 13 years ago

v0.15. Selecting a particular album, or an artist, in iTunes with the Column browser, the track listing will almost always show one spurious track from a different artist or album, and often one legitimate track will be missing. See screenshot (iTunes 10.1.0.56). For comparison, not the case with a firefly/mtdaapd server.

peterjc commented 13 years ago

Sounds like an off by one error. Had you seen this on older versions of forked-daapd?

ldesgrange commented 13 years ago

Same here. I noticed that when I upgraded from 0.14 to 0.15. I rebuilt the database but the problem persist (interestingly the same tracks where mixed up the same way). What I noticed is that all the tags of the song are correct except the "sort *" tags (sort name, sort artist…). By the way, other songs that seem to be well sorted also have the "sort name" tag mixed up with the name of other songs from the same album.

stormcock commented 13 years ago

OK, I see the reason now. In response to a /items request, server sends the first track OK, but each subsequent track contains extra sort data related to the previous track (assn:daap.sortname, assa:daap.sortartist, assu:daap.sortalbum, assl:daap.sortalbumartist and assc:daap.sortcomposer). So even when these fields are requested specifically, or all meta is requested, the incorrect data comes first - and presumably iTunes detects the first instance and ignores subsequent ones. The incorrect data comes immediatley after the asdk:daap.songdatakind field. Did I explain this OK?

Seems to occur whenever info for a number of items is returned, e.g. requesting all items, or with a query in the 'items' url.

peterjc commented 13 years ago

Does this fix it?

https://github.com/jasonmc/forked-daapd/commit/a70a45d92562df13631f200c5409db06e58b8e01

stormcock commented 13 years ago

Yes, this fixes, thank you very much.