Bug 559 - Automatically remove bogus tracks from playlists
: Automatically remove bogus tracks from playlists
Status: RESOLVED WONTFIX
Product: Logitech Media Server
Classification: Unclassified
Component: Tools
: 5.x or older
: PC Windows (legacy)
: -- enhancement with 1 vote (vote)
: Future
Assigned To: Unassigned bug - please assign me!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-09-16 02:38 UTC by Nalle Johansson
Modified: 2019-01-25 12:07 UTC (History)
0 users

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nalle Johansson 2004-09-16 02:38:01 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.
Comment 1 Simon Oosthoek 2004-12-19 05:06:50 UTC
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
Comment 2 Simon Oosthoek 2004-12-19 05:38:36 UTC
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);
Comment 3 Chris Owens 2008-12-18 11:49:04 UTC
Routine bug db maintenance; removing old versions which cause confusion.  I apologize for the inconvenience.
Comment 4 Chris Owens 2010-05-06 15:54:33 UTC
Dean doesn't work here any more :)
Comment 5 Alan Young 2011-11-06 23:23:40 UTC
Unassigned bugs cannot have a priority.