Bug 2932 - Temp Files are still exist after finished playlist
: Temp Files are still exist after finished playlist
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Playlists
: 6.2.2
: PC Windows XP
: P2 normal (vote)
: ---
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-02-05 04:41 UTC by Jens Boettiger
Modified: 2006-02-11 01:26 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Boettiger 2006-02-05 04:41:18 UTC
A temp file of a playlist will still remain in the playlist folder after the playlist is finished.

Example:
Start a playlist over "Browse Playlists" (it doesn't mater if you start it from the web UI or from the squeezebox). 
A temp file of the current playlist will be creating in the playlist folder.
After playing all titles on the playlist I turn off the SB or play another playlist, but the temp file of the playlist will still exist in the playlist folder.
I have to clean up manually it...
Comment 1 KDF 2006-02-07 00:02:02 UTC
what are the filenames of these temp files?
Comment 2 Jens Boettiger 2006-02-08 02:54:35 UTC
The file name are the same as the playlsit name with tmp as extension.

Example:
Depeche Mode - Speech.tmp -> Depeche Mode --- Speech.tmp 
Comment 3 KDF 2006-02-08 09:03:49 UTC
I've never seen anything like that before.  In fact, I am not aware of slimserver creating any temp files aside from what used to be "player playlists", before slimserver v6.0.
Comment 4 Jens Boettiger 2006-02-09 13:05:55 UTC
But that's the fact.
Every time I use a playlist, there is a tmp file in Playlist directory.

One correction: the tmp file is e.g. Depeche Mode --- Speech.m3u.tmp

If I show inside the tmp file, there is the same as in the original m3u file, not more.
Comment 5 KDF 2006-02-09 13:32:00 UTC
in response to comments posted in bug 1710 (which I assume were intended for bug 2932):

I see where this is being done.  Slimserver tries to keep track of the current song for each playlist.  If you restart a givne playlist, it will use that track.  The current track info is written to a temp file, which overwrites the playlist file IF it is writeable.  

Dan,  what do you think about simply deleting the tmp file, like so:

	if (-w $path) {

		rename("$path.tmp", $path);
	} else {
		delete("$path.tmp");
	}
Comment 6 KDF 2006-02-09 19:59:12 UTC
er, guess that delete really should be "unlink", but I expect that should take care of things.  
Comment 7 Dan Sully 2006-02-09 23:10:51 UTC
Yeah - looks ok to me.
Comment 8 KDF 2006-02-09 23:15:00 UTC
committed to trunk at change 6199 for 6.5 builds
committed to 6.2.2 builds at change 6200. Please try the Feb 10 build and re-open if issues remain.
Comment 9 Jens Boettiger 2006-02-11 01:26:14 UTC
worked! thanks.

One hint: My last comment are not shown her:
The temp will be only created, if the playlist file is read only.

Regards,
Jens