The directory caching optimization that was added to fill_playlists (playlist.c) in 1.0.23 is broken. It gets completely confused by tracks with the same file name in different directories.
Consider this playlist, for example:
#EXTM3U
/home/pilcher/rpmbuild/BUILD/minidlna-1.0.23/all-music/Jethro_Tull/Minstrel_in_the_Gallery/track05.mp3
/home/pilcher/rpmbuild/BUILD/minidlna-1.0.23/all-music/Yes/Big_Generator/track02.mp3
/home/pilcher/rpmbuild/BUILD/minidlna-1.0.23/all-music/Jethro_Tull/Thick_as_a_Brick/track01.mp3
When this list is parsed, the tracks that actually get put in to the playlist are:
/home/pilcher/rpmbuild/BUILD/minidlna-1.0.23/all-music/Jethro_Tull/Minstrel_in_the_Gallery/track05.mp3
/home/pilcher/rpmbuild/BUILD/minidlna-1.0.23/all-music/Jethro_Tull/Minstrel_in_the_Gallery/track02.mp3
/home/pilcher/rpmbuild/BUILD/minidlna-1.0.23/all-music/Jethro_Tull/Minstrel_in_the_Gallery/track01.mp3
I.e. it uses the first directory for all of the tracks.
I am attaching a patch that appears to fix the problem for me. You'll see that it eliminates any concept of saving the last directory altogether and just looks for the complete pathname of the track in the database.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Fix broken playlist parsing optimization
Let's see if we can fix the caching, rather than getting rid of it. Believe it or not, there are libraries where this speeds things up about 4x. Please try with the attached patch.
Fix false positive in playlist optimization
Well, it works for me so I checked in the change and I'll just go ahead and close this. If you still see problems, please reopen.
Fix false positive in playlist optimization - try #2
Fix false positive in playlist optimization - try #3
Fix false positive in playlist optimization - try #4