Rockbox

Tasklist

FS#2730 - "Replace Playlist" feature

Attached to Project: Rockbox
Opened by Jochen Schulz (jochen-schulz) - Sunday, 30 October 2005, 13:02 GMT
Last edited by Mikael Magnusson (mikaelh) - Thursday, 16 February 2006, 20:26 GMT
Task Type Feature Requests
Category
Status Closed
Assigned To No-one
Operating System
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Hi!

I am missing the possibility to replace the current
playlist with another one dynamically. Let me explain:

Say, I choose one of the tracks from /artist/album/.
That creates a new playlist with all the music files in
this directory. Now I changed my mind and I would like
to hear /artist/doublealbum/. Unfortunately, this
directory contains two subdirectories cd1 and cd2. If I
want to play both of them, I currently have to choose a
track from cd1 and then insert cd2 at the end of the
playlist. My idea is to provide a new item in the
playlist context menu labelled "Replace" or something
like that.

Now I could simply go to /artist/doublealbum, use
"Replace" from the playlist menu and I had all the
tracks from cd1 and cd2 in the playlist, while none
from /artist/album remain.

The only issue I can see with this is the question what
happens to the currently playing song (from the old
playlist). I would prefer it to keep playing until it
ends or I skip forward. After that, the new playlist
should start to play (I think that's the way
xmms/winamp handle similar situations). But if that
proves to be difficult, Rockbox could just start to
play the new playlist as well.

This task depends upon

Closed by  Bj√∂rn Stenberg (zagor)
Monday, 29 January 2007, 12:35 GMT
Reason for closing:  Fixed
Additional comments about closing:  Closing all feature requests.
Comment by Linus Nielsen Feltzing (linusnielsen) - Sunday, 30 October 2005, 17:34 GMT

Why not just create a playlist with the two CD:s in it, and
then play it?
Comment by Jochen Schulz (jochen-schulz) - Sunday, 30 October 2005, 22:29 GMT

Because sometimes I also want to create a completely new
playlist with only one or a few songs from one directory.
Like, if I am at a party and use my iriver as a jukebox. I
have a playlist with all the songs from the album of the
currently playing song. But I wanted to play just this one
song. If I could use "replace" for files and directories, I
could create a new playlist with just one song and then
insert every other song by hand (and then maybe repeat the
playlist without the songs I didn't want in the first place).

At first, I thought I needed a "clear playlist" feature, but
"replace" could work as well and is problably more
straightforward.
Comment by Mikael Magnusson (mikaelh) - Thursday, 16 February 2006, 20:26 GMT

I added an adhoc Clear Playlist entry to my menu...

Index: apps/onplay.c
===================================================================
RCS file: /cvsroot/rockbox/apps/onplay.c,v
retrieving revision 1.71
diff -p -u -d -r1.71 onplay.c
--- apps/onplay.c 9 Feb 2006 09:09:32 -0000 1.71
+++ apps/onplay.c 16 Feb 2006 20:24:53 -0000
@@ -151,6 +151,11 @@ static bool shuffle_playlist(void)
return false;
}

+static bool clear_playlist(void)
+{
+ return playlist_create(NULL, NULL);
+}
+
static bool save_playlist(void)
{
save_playlist_screen(NULL);
@@ -243,8 +248,8 @@ static bool view_playlist(void)
/* Sub-menu for playlist options */
static bool playlist_options(void)
{
- struct menu_item items[12];
- struct playlist_args args[12]; /* increase these 2 if
you add entries! */
+ struct menu_item items[13];
+ struct playlist_args args[13]; /* increase these 2 if
you add entries! */
int m, i=0, pstart=0, result;
bool ret = false;

@@ -274,6 +279,11 @@ static bool playlist_options(void)
items[i].function = shuffle_playlist;
i++;
pstart++;
+
+ items[i].desc = "Clear playlist";
+ items[i].function = clear_playlist;
+ i++;
+ pstart++;
}

if (context == CONTEXT_TREE || context == CONTEXT_ID3DB)
Comment by Mark (mlmurray) - Tuesday, 04 April 2006, 13:26 GMT
Any chance that Mikachu's code will get added to the source tree? Something like a "Clear Playlist" or "Replace Playlist with" in the context menu would be very worthwhile.

Loading...