summaryrefslogtreecommitdiffstats
path: root/apps/playlist_catalog.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2007-04-18 13:03:01 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2007-04-18 13:03:01 +0000
commit36a2e3087295385d15797f83120222ff71dc32bf (patch)
tree99ef6148d8b020396734f9c3dcfd520d730045f3 /apps/playlist_catalog.c
parentf44f961812c059b69df19ac5bd828986ba10513f (diff)
downloadrockbox-36a2e3087295385d15797f83120222ff71dc32bf.tar.gz
rockbox-36a2e3087295385d15797f83120222ff71dc32bf.tar.bz2
rockbox-36a2e3087295385d15797f83120222ff71dc32bf.zip
Move the inbuilt filetype info into filetypes.c and rename the defines.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13201 a1c6a512-1295-4272-9138-f99709370657
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 @@
#include "sprintf.h"
#include "tree.h"
#include "yesno.h"
+#include "filetypes.h"
#define PLAYLIST_CATALOG_CFG ROCKBOX_DIR "/playlist_catalog.config"
#define PLAYLIST_CATALOG_DEFAULT_DIR "/Playlists"
@@ -167,7 +168,7 @@ static int create_playlist_list(char** playlists, int num_items,
for (i=0; i<num_files && index<num_items; i++)
{
- if (files[i].attr & TREE_ATTR_M3U)
+ if (files[i].attr & FILE_ATTR_M3U)
{
if (most_recent && !strncmp(files[i].name, most_recent_playlist,
sizeof(most_recent_playlist)))
@@ -287,7 +288,7 @@ static int display_playlists(char* playlist, bool view)
snprintf(playlist, MAX_PATH, "%s/%s", playlist_dir,
sel_file);
- if (onplay(playlist, TREE_ATTR_M3U,
+ if (onplay(playlist, FILE_ATTR_M3U,
CONTEXT_TREE) != ONPLAY_OK)
{
result = 0;
@@ -358,13 +359,13 @@ static int add_to_playlist(const char* playlist, char* sel, int sel_attr)
/* In case we're in the playlist directory */
reload_directory();
- if ((sel_attr & TREE_ATTR_MASK) == TREE_ATTR_MPA)
+ if ((sel_attr & FILE_ATTR_MASK) == FILE_ATTR_AUDIO)
{
/* append the selected file */
if (fdprintf(fd, "%s\n", sel) > 0)
result = 0;
}
- else if ((sel_attr & TREE_ATTR_MASK) == TREE_ATTR_M3U)
+ else if ((sel_attr & FILE_ATTR_MASK) == FILE_ATTR_M3U)
{
/* append playlist */
int f, fs, i;