I've noticed that smart playlists on iPods with string comparisons (artist name etc) created with libgpod behave differently to those created in iTunes. Playlists created in and evaluated with libgpod do a case sensitive string comparison, iTunes does a case-insensitive one. This means if you create a playlist with libgpod then access the device in iTunes, the contents of the smart playlist will often change (iTunes seems to re-evaluate smart playlist rules every time a device is first attached).
I think case insensitive matching would be preferable: it's more likely to be what the user expects, and matches iTunes behaviour. As far as I can tell all the string comparison rules in iTunes are case-insensitive (contains/does not contain/is/is not/starts with/ends with).
This would be a trivial change (using strcasecmp/strcasestr/strncasecmp in itdb_splr_eval in itdb_playlist.c), but I don't know if this issue has come up before and the current behaviour was deemed preferable.
Sorry it took me an eternity to answer to your email :(
On Sat, Oct 30, 2010 at 09:14:48PM +0100, James Burton wrote:
> This would be a trivial change (using strcasecmp/strcasestr/strncasecmp
> in itdb_splr_eval in itdb_playlist.c), but I don't know if this issue has
> come up before and the current behaviour was deemed preferable.
I don't think the case sensitive match was done on purpose, it's more than
noone has brought it up so far imo :) So your patch is really helpful!
However, I reworked it so that it handles non-ASCII UTF-8 strings as well,
(disclaimer, I haven't tested it yet ;)
Let me know if that's fine with you, thanks again for the patch, and I'm
really sorry for the huge delay in answering :(