Rockbox Technical Forums

Rockbox General => Rockbox General Discussion => Topic started by: Neff on October 12, 2005, 04:09:27 AM

Title: Playlist Settings Suggestion
Post by: Neff on October 12, 2005, 04:09:27 AM
I know in the past there has been some discussion and requests about trying to save certain settings with specific playlists... e.g. one playlist should always be shuffled, one with crossfade etc.

A relatively simple method of achieving this has just occurred to me; when a playlist is loaded (playlist.m3u) rockbox could check to see if there is a matching config file (playlist.cfg) and if there is apply that before loading the playlist.

Then by creating a cfg file with just the settings you want changed in it you could achieve virtually any changes you need.

Can anyone spot any problems with that idea?
Title: Re: Playlist Settings Suggestion
Post by: Bagder on October 12, 2005, 05:36:33 AM
Or possibly the other way around: the cfg file could specify a playlist or song to play...
Title: Re: Playlist Settings Suggestion
Post by: Neff on October 12, 2005, 06:07:45 AM
I see what you're saying, but IMHO that subtly changes what a config file is and it seems more natural to start a playlist by selecting a playlist file
Title: Re: Playlist Settings Suggestion
Post by: kenshin on October 12, 2005, 10:47:54 AM
What about adding the "config" settings directly into the playlist file as comments? As I recall, the m3u format allows comments on lines that start with a # and other players would ignore the unknown comments while Rockbox would recognize, understand, and maintain them.
Title: Re: Playlist Settings Suggestion
Post by: the_winch on October 12, 2005, 03:11:47 PM
Why not add the config file to the start of the playlist as with an audio file.
Then when you play the playlist rockbox would "play" the config file changing the required settings.
This way you could have multiple config files in different positions of the playlist. It would have problems if one config turned on shuffle only to randomly play another config that turned it off.
Title: Re: Playlist Settings Suggestion
Post by: Neff on October 13, 2005, 01:39:32 AM
I wasn't sure if m3us supported comments, all the pages I found on my 1st googling didn't mention anything other than the EXIF lines (e.g. http://forums.winamp.com/showthread.php?threadid=65772) but the following one does describe comments. (http://www.assistanttools.com/articles/m3u_playlist_format.shtml)
Title: Re: Playlist Settings Suggestion
Post by: kenshin on October 13, 2005, 09:51:41 AM
Why not add the config file to the start of the playlist as with an audio file.
Then when you play the playlist rockbox would "play" the config file changing the required settings.
This way you could have multiple config files in different positions of the playlist. It would have problems if one config turned on shuffle only to randomly play another config that turned it off.

There's an idea. I think it ought to still reside in a comment, though. Not all players are smart enough to discard unknown file types so you might end up with with some nasties if you take that playlist off to a PC or another DAP. Maybe:

Code: [Select]
# RBXCFG: some/file.cfg
This assumes Rockbox would be smart enough to not discard these when loading the playlist but rather would keep them in the list while other players (ala Winamp) would simply discard them.
Title: Re: Playlist Settings Suggestion
Post by: the_winch on October 13, 2005, 03:43:54 PM
You can't really store stuff in m3u comments if you want it to survive edits.
The trouble is it's quite common for programs to ignore the comments when loading the playlist into some internal format that's easy to work with. If you then edit the playlist and save it the resulting playlist has none of the original comments.
Both rockbox and winamp both appear to do this as they lose coments when editing a playlist.
Title: Re: Playlist Settings Suggestion
Post by: Neff on October 14, 2005, 03:24:17 AM
So it's back to my idea about using a matching named config file?
Title: Re: Playlist Settings Suggestion
Post by: Chill on October 14, 2005, 08:07:32 AM
It looks as though a valid entry in an M3U playlist could be a another playlist, allowing playlists to be 'chained'.  What if the content of that other playlist was just a .CFG file - let's call that other playlist a 'config playlist' for the sake of argument.  Rockbox could then 'play' that config file, as suggested above, when it encounters the config playlist.  Other players, eg winamp, would just ignore the config playlist if it did not exist on the PC, but should not discard such an entry when editing (because it is a valid entry).

On the iriver you would simply need a few one-line config playlists that 'wrap' your different config files.  This might still cause a problem if the iriver is just being used as a hard disk for Winamp, because then Winamp would find those config playlists and cause some sort of error.