summaryrefslogtreecommitdiff
path: root/apps/playlist_catalog.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/playlist_catalog.c')
-rw-r--r--apps/playlist_catalog.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/playlist_catalog.c b/apps/playlist_catalog.c
index 1e3d523181..5ff2bddaab 100644
--- a/apps/playlist_catalog.c
+++ b/apps/playlist_catalog.c
@@ -37,6 +37,7 @@
37#include "sprintf.h" 37#include "sprintf.h"
38#include "tree.h" 38#include "tree.h"
39#include "yesno.h" 39#include "yesno.h"
40#include "filetypes.h"
40 41
41#define PLAYLIST_CATALOG_CFG ROCKBOX_DIR "/playlist_catalog.config" 42#define PLAYLIST_CATALOG_CFG ROCKBOX_DIR "/playlist_catalog.config"
42#define PLAYLIST_CATALOG_DEFAULT_DIR "/Playlists" 43#define PLAYLIST_CATALOG_DEFAULT_DIR "/Playlists"
@@ -167,7 +168,7 @@ static int create_playlist_list(char** playlists, int num_items,
167 168
168 for (i=0; i<num_files && index<num_items; i++) 169 for (i=0; i<num_files && index<num_items; i++)
169 { 170 {
170 if (files[i].attr & TREE_ATTR_M3U) 171 if (files[i].attr & FILE_ATTR_M3U)
171 { 172 {
172 if (most_recent && !strncmp(files[i].name, most_recent_playlist, 173 if (most_recent && !strncmp(files[i].name, most_recent_playlist,
173 sizeof(most_recent_playlist))) 174 sizeof(most_recent_playlist)))
@@ -287,7 +288,7 @@ static int display_playlists(char* playlist, bool view)
287 snprintf(playlist, MAX_PATH, "%s/%s", playlist_dir, 288 snprintf(playlist, MAX_PATH, "%s/%s", playlist_dir,
288 sel_file); 289 sel_file);
289 290
290 if (onplay(playlist, TREE_ATTR_M3U, 291 if (onplay(playlist, FILE_ATTR_M3U,
291 CONTEXT_TREE) != ONPLAY_OK) 292 CONTEXT_TREE) != ONPLAY_OK)
292 { 293 {
293 result = 0; 294 result = 0;
@@ -358,13 +359,13 @@ static int add_to_playlist(const char* playlist, char* sel, int sel_attr)
358 /* In case we're in the playlist directory */ 359 /* In case we're in the playlist directory */
359 reload_directory(); 360 reload_directory();
360 361
361 if ((sel_attr & TREE_ATTR_MASK) == TREE_ATTR_MPA) 362 if ((sel_attr & FILE_ATTR_MASK) == FILE_ATTR_AUDIO)
362 { 363 {
363 /* append the selected file */ 364 /* append the selected file */
364 if (fdprintf(fd, "%s\n", sel) > 0) 365 if (fdprintf(fd, "%s\n", sel) > 0)
365 result = 0; 366 result = 0;
366 } 367 }
367 else if ((sel_attr & TREE_ATTR_MASK) == TREE_ATTR_M3U) 368 else if ((sel_attr & FILE_ATTR_MASK) == FILE_ATTR_M3U)
368 { 369 {
369 /* append playlist */ 370 /* append playlist */
370 int f, fs, i; 371 int f, fs, i;