summaryrefslogtreecommitdiffstats
path: root/apps/tree.c
diff options
context:
space:
mode:
authorWilliam Wilgus <me.theuser@yahoo.com>2019-08-17 23:40:45 -0500
committerWilliam Wilgus <me.theuser@yahoo.com>2019-08-18 10:18:31 -0500
commit8b7ae89b43ef4c96b55671759869397676ee9e05 (patch)
treefb40f9f121d6d73667221b08d9af558e02bcae74 /apps/tree.c
parent5a4cdb96b91078c7cd3f8d5a389aace68b530437 (diff)
downloadrockbox-8b7ae89b43ef4c96b55671759869397676ee9e05.tar.gz
rockbox-8b7ae89b43ef4c96b55671759869397676ee9e05.tar.bz2
rockbox-8b7ae89b43ef4c96b55671759869397676ee9e05.zip
Playlist rework
consolidate some of the playlist create functions remove extensions from playlist naming (you can still add it if you desire) switch to strlcpy, strlcpy functions Change-Id: Ibd62912da4d1f68ed5366baa887d92d4c6b1f933
Diffstat (limited to 'apps/tree.c')
-rw-r--r--apps/tree.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/tree.c b/apps/tree.c
index 8f0abf4a8b..311c3ce543 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -941,9 +941,11 @@ static int dirbrowse(void)
int create_playlist(void)
{
+ bool ret;
+#if 0 /* handled in catalog_add_to_a_playlist() */
char filename[MAX_PATH + 16]; /* add enough space for extension */
const char *playlist_dir = catalog_get_directory();
- if (strcmp(tc.currdir, playlist_dir) != 0)
+ if (tc.currdir[1] && strcmp(tc.currdir, playlist_dir) != 0)
snprintf(filename, sizeof filename, "%s.m3u8", tc.currdir);
else
snprintf(filename, sizeof filename, "%s/all.m3u8", playlist_dir);
@@ -951,12 +953,13 @@ int create_playlist(void)
if (kbd_input(filename, MAX_PATH))
return 0;
splashf(0, "%s %s", str(LANG_CREATING), filename);
+#endif
trigger_cpu_boost();
- catalog_add_to_a_playlist(tc.currdir, ATTR_DIRECTORY, true, filename);
+ ret = catalog_add_to_a_playlist(tc.currdir, ATTR_DIRECTORY, true, NULL);
cancel_cpu_boost();
- return 1;
+ return (ret) ? 1 : 0;
}
void browse_context_init(struct browse_context *browse,