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

Sorting when artist name includes 'The ' #56

Open stormcock opened 13 years ago

stormcock commented 13 years ago

One consequence of sending sort information (e.g. daap.sortartist etc.) as part of the metadata for songs is that iTunes usual sorting instincts are overriden. Where normally iTunes would sort an artist such as 'The Waterboys' using the W, with a forked-daapd source it sorts the artist using T for 'The '. So, if forked-daapd has to send this sort meta (which i don't think iTunes requests), could it sort such artist names by ignoring the 'The ' part?

Tim

elwertk commented 13 years ago

Ok, as I developed the majority of the sorting I thought I comment on that to give some insights into this.

What made us looking into sort tags initialy was the showing of some strange and rather annoying behaviour of more recent versions of itunes against a daap share. When lacking sort tags itunes was looking elsewhere (i.e. in the local library cache) for them resulting in the listing "jumping" arround while selecting songs for playback (think this was reported here as well a while ago). Making use of the sort tags and pushing them out was the only way to get this consistent and fixed the issue. This answers the usage of them allthough it may seem itunes doesn't explicitly require them.

Further to this having sort tags helps with getting the remote behaviour right and was a feature enhancement that is well appreciated by many.

On your issues with those leading article stuff "the bla" and "a band". Those are laymen means of sorting that itunes brought in place before sorting tags where even arround. It is inconsistent, breaks unicode and internationalsation. On of the key reasons sort tags came into play at all.

Itunes might still maintain this by looking at artist, title etc. It however overwrites this if sort tags are in place. Thats what we do and that is supposely the only consistent way. Bottomline no effort ever will be spend making those wild leading article assumptions on tags. If you like this behaviour sort tags are your friend.

So one may achieve standard itunes behaviour and look and feel but has an option to overwrite. BTW something that is highly appreciated by fans of classic music.

Hope this makes sense

Kai

peterjc commented 13 years ago

So try filling in the ID3 artist sort order tags as "Band, The" and it should appear under "B" not "T". And if it doesn't then it's a bug?

elwertk commented 13 years ago

Basicaly this is the expected behaviour. Keep in mind however that sorting is impacted by a few other fields as well. I.e. album_artist, album_artist_sort, compiltation yes/no etc. which may take precedence over each other.

stormcock commented 13 years ago

Thanks for the insight in to development of this feature. It seems to me that when a client doesn't request sort information from the server, even when it could, it is really say "thanks guys, I will sort these myself". That's what iTunes does, as do the Roku players. iTunes knows about sort tags, but deliberately doesn't request them. So pushing out meta data (i.e sort information) that the client does not request, which then confounds the way that the client sorts, seems to me to be bad practice. Regarding artist names beginnning with 'The ', well the 'The ' is part of the name of the artist and not a definite article, but nevertheless I would expect 'The Beatles' to be listed under 'B' in a record shop - wouldn't you? Put it another way - I would be really surprised and annoyed to find them under 'T'. I understand that there is no easy algorithm to detect the most appropriate sorting, but for the obvious ones I would think that it could be done - I don't see the issue of 'The ' at the beginning of an artist name as a 'wild assumption' at all! Regards, Tim