Bug 1994 - Renaming a music file occuring in a playlist results in no album/no artist entries
: Renaming a music file occuring in a playlist results in no album/no artist en...
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Database
: unspecified
: PC Debian Linux
: P2 normal (vote)
: ---
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-08-18 16:34 UTC by Michel Marti
Modified: 2009-09-08 09:29 UTC (History)
0 users

See Also:
Category: ---


Attachments
output of slimserver --d_scan (6.50 KB, text/plain)
2005-08-19 09:09 UTC, Michel Marti
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Marti 2005-08-18 16:34:11 UTC
When renaming a music file which is referenced in a playlist, this creates no
album / no artist entries in the database (which really confused me because I
first had no idea why). I suggest that the playlist db import should check if a
file exists (unless its a remote url) before adding it to the database. Maybe a
warning should be written to the log ("Ignoring file x in playlist y since it
doesn't exist (anymore). 

Steps to reproduce:

1. Play a single song
2. Create a playlist (using the html-gui) containing this song and save the playlist
3. Stop slimserver, remove the cache directory
4. rename the music file played in step 1
5. restart slimserver

You will now see an entry "No album" in the album list, "No artist" in the
artist list and "No album" in the "browse artwork" list.
Comment 1 Dan Sully 2005-08-18 16:48:56 UTC
This has already been fixed in the 6.2 tree as of the 2005-08-18 nightly.
Comment 2 Michel Marti 2005-08-18 23:40:48 UTC
Dan,

I'm at SVN rev 3998 (trunk) and this bug is still reproducable.
Comment 3 Dan Sully 2005-08-18 23:43:24 UTC
Have you rescanned your playlists?

There should be verbose output now if the playlist parser can't find a file on disk.
Comment 4 Michel Marti 2005-08-19 00:31:57 UTC
I removed the slimserver-cache and restarted slim. Isn't this enough? Do I have
to explicitly enable playlist (re)scanning? 
Comment 5 Michel Marti 2005-08-19 09:09:10 UTC
Created attachment 743 [details]
output of slimserver --d_scan

Logfile showing output from --d_scan on startup of slimserver (I removed the
"cache" directory before starting slim). Music Folder contains one mp3 file
(Welcome2.mp3) and one playlist pointing to no-longer-existing "Welcome.mp3".
Comment 6 Michel Marti 2005-08-19 15:23:58 UTC
Here's a possible fix:

Index: Formats/Parse.pm
===================================================================
--- Formats/Parse.pm    (revision 4005)
+++ Formats/Parse.pm    (working copy)
@@ -945,8 +945,7 @@
 
        my $caller = (caller(1))[3];
 
-       if (Slim::Music::Info::isURL($entry)) {
-
+       if ($entry !~ "file://" && Slim::Music::Info::isURL($entry)) {
                return 1;
        }
 
Comment 7 Dan Sully 2005-08-23 22:44:54 UTC
Fixed in subversion change 4041