PDA

View Full Version : Playlist storage confusion



Philip Meyer
2005-09-07, 16:25
What is the master - the playlist file held on disk, or the playlist in the DB when it has been scanned?

Eg. If I have a playlist on disk and this gets scanned into slimserver, and I then delete an entry from the playlist in slimserver, this will write the playlist back to the physical playlist file on disk. However, if the playlist file has been altered on disk, these changes will be lost.

In my situation, I have a physical playlist file that is automatically updated. I have software that downloads mp3s from a podcast and appends the items to a .m3u playlist. Each morning, a rescan re-reads the phsical playlist, thus adding the new items to the slimserver playlist.

I use this playlist for my alarm. Each track is a 30+ min broadcast containing several songs.

After I listen to each track from the front (so the playlist is acting like a queue), I delete the item from the playlist. I've been trying to do this from the squeezebox using the Zap feature (not currently working), as this is a lot easier than amending the playlist from the squeezebox.

I've found though that if I do amend the slimserver playlist, this overwrites any pending physical file changes with the slimserver version of the playlist.

I don't think this is a good situation to be in really (having two things that can change one source). Some things seem to be going wrong with this - in my example, sometimes the first item in the slimserver playlist gets deleted after I save a playlist, even though I have not deleted that item in either the physical file or slimserver.

It might catch other people out if they use the playlists in other applications too.

I think in my case, zapping the played items is the best way to go, and then I can look at the zapped playlist to determine which physical files to delete, and manually amend the playlist file on disk to remove those tracks. I can then delete the items from the zapped playlist and rescan playlists. I'm happy to do this, but perhaps there's a better way to be doing things?

Better, I guess, would be to have the application use the CLI (or something else) to add new podcast enclosures to the playlist held in slimserver, and not use a physical playlist file at all. However, if SlimServer is not running when the other application downloads a new podcase enclosure, the CLI wouldn't be able to add the item to the playlist. Currently, the app that I am using can only append items to a playlist, not run an external app, so I can't do this anyway.

Better still (for my specific problem) would be to have a windows application that detects filesystem notifications for playlists and signals slimserver to rescan the playlist. I could write a windows-specific app to do this, which perhaps could use the CLI to cause a playlist rescan (I haven't looked into what is available in the CLI yet, but would imagine this is currently possible or could be enhanced). If slimserver isn't running, perhaps a flag could be set to perform a playlist rescan on restart.

Any comments?

Phil