Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#116 [PATCH] Fix broken playlist parsing optimization

closed-fixed
None
5
2012-02-11
2012-01-28
Anonymous
No

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.

Discussion


  • Anonymous
    2012-01-28

    Fix broken playlist parsing optimization

     
    Attachments
  • Justin Maggard
    Justin Maggard
    2012-02-03

    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.

     
  • Justin Maggard
    Justin Maggard
    2012-02-03

    Fix false positive in playlist optimization

     
    Attachments
  • Justin Maggard
    Justin Maggard
    2012-02-11

    • assigned_to: nobody --> jmaggard
    • status: open --> closed-fixed
     
  • Justin Maggard
    Justin Maggard
    2012-02-11

    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.

     
  • Justin Maggard
    Justin Maggard
    2012-02-13

    Fix false positive in playlist optimization - try #2

     
    Attachments
  • Justin Maggard
    Justin Maggard
    2012-02-13

    Fix false positive in playlist optimization - try #3

     
    Attachments
  • Justin Maggard
    Justin Maggard
    2012-02-13

    Fix false positive in playlist optimization - try #4

     
    Attachments