Bugzilla – Bug 559
Automatically remove bogus tracks from playlists
Last modified: 2019-01-25 12:07:24 UTC
After a while using Slimserver with a big archive of music - I have found several bad songs in my archive. Bad format or bad bitrate or bad music ;o) If I delete a song from the disk and slimserver can�t read that file when it plays a playlist - a good thing is to have an option in slimserver to fix the playlists (remove bad lines) or a util that does this. If not exist file in playlist - remove file in playlist Maybe a simple hack? I run Windows.
I think it would be useful in general to be able to "clean" a playlist, not just when the server comes across a missing file when playing (it could just be temporarily unavailable, so it should not be set by default to do this!) A feature added to the playlist edit function: "purge unreachable songs" or somesuch would be highly useful I think! PS, I'm currently running slimserver 5.4 on linux
here's some code that does the trick, but I don't know how to add it to the slimserver.... #!/usr/bin/perl -w open(F, "<$ARGV[0]") or die "problem opening file $ARGV[0]\n"; while ( $f = <F> ) { chomp $f; if ($f =~ /^\#CURTRACK/) { print "$f\n"; $f = <F>; chomp $f; } if ($f =~ /^\#EXTM3U/) { print "$f\n"; $f = <F>; chomp $f; } if ($f =~ /^\#EXTINF/) { $extinf = $f; $f = <F>; chomp $f; if (-f $f) { print "$extinf\n"; print "$f\n"; } } elsif (-f $f) { print "$f\n"; } else { print STDERR "file doesn't exist: $f\n"; } } close(F);
Routine bug db maintenance; removing old versions which cause confusion. I apologize for the inconvenience.
Dean doesn't work here any more :)
Unassigned bugs cannot have a priority.