summaryrefslogtreecommitdiffstats
path: root/apps/playlist_catalog.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2008-05-04 13:01:16 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2008-05-04 13:01:16 +0000
commit517aca8532af3121d9c75ff293c5269f20c0b540 (patch)
treeb8e14baa69ff80d6734d8358864ff4859dc5f566 /apps/playlist_catalog.c
parent194b2ca887f44e6c3e0244e7f4733060e7aa1618 (diff)
downloadrockbox-517aca8532af3121d9c75ff293c5269f20c0b540.tar.gz
rockbox-517aca8532af3121d9c75ff293c5269f20c0b540.tar.bz2
rockbox-517aca8532af3121d9c75ff293c5269f20c0b540.zip
use the playlist catalog code to generate the playlists under Playlist > Create playlist
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17352 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/playlist_catalog.c')
-rw-r--r--apps/playlist_catalog.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/apps/playlist_catalog.c b/apps/playlist_catalog.c
index 52210580ad..17db24984b 100644
--- a/apps/playlist_catalog.c
+++ b/apps/playlist_catalog.c
@@ -419,7 +419,8 @@ bool catalog_view_playlists(void)
return true;
}
-bool catalog_add_to_a_playlist(char* sel, int sel_attr, bool new_playlist)
+bool catalog_add_to_a_playlist(char* sel, int sel_attr,
+ bool new_playlist, char *m3u8name)
{
char playlist[MAX_PATH];
@@ -429,9 +430,14 @@ bool catalog_add_to_a_playlist(char* sel, int sel_attr, bool new_playlist)
if (new_playlist)
{
size_t len;
- snprintf(playlist, MAX_PATH, "%s/", playlist_dir);
- if (kbd_input(playlist, MAX_PATH))
- return false;
+ if (m3u8name == NULL)
+ {
+ snprintf(playlist, MAX_PATH, "%s/", playlist_dir);
+ if (kbd_input(playlist, MAX_PATH))
+ return false;
+ }
+ else
+ strcpy(playlist, m3u8name);
len = strlen(playlist);