forked from len0rd/rockbox
properties plugin: the HWCODEC targets don't have get_metadata so no ID3 info for them.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14330 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
da6df9944d
commit
adb64bbb9b
1 changed files with 8 additions and 1 deletions
|
@ -33,9 +33,12 @@ char str_dircount[64];
|
||||||
char str_filecount[64];
|
char str_filecount[64];
|
||||||
char str_date[64];
|
char str_date[64];
|
||||||
char str_time[64];
|
char str_time[64];
|
||||||
|
|
||||||
|
#if (CONFIG_CODEC == SWCODEC)
|
||||||
char str_title[MAX_PATH];
|
char str_title[MAX_PATH];
|
||||||
char str_artist[MAX_PATH];
|
char str_artist[MAX_PATH];
|
||||||
char str_album[MAX_PATH];
|
char str_album[MAX_PATH];
|
||||||
|
#endif
|
||||||
|
|
||||||
int num_properties;
|
int num_properties;
|
||||||
|
|
||||||
|
@ -97,6 +100,7 @@ static bool file_properties(char* selected_file)
|
||||||
|
|
||||||
num_properties = 5;
|
num_properties = 5;
|
||||||
|
|
||||||
|
#if (CONFIG_CODEC == SWCODEC)
|
||||||
fd = rb->open(selected_file, O_RDONLY);
|
fd = rb->open(selected_file, O_RDONLY);
|
||||||
if (fd >= 0)
|
if (fd >= 0)
|
||||||
{
|
{
|
||||||
|
@ -108,10 +112,11 @@ static bool file_properties(char* selected_file)
|
||||||
"Title: %s", id3.title ? id3.title : "");
|
"Title: %s", id3.title ? id3.title : "");
|
||||||
rb->snprintf(str_album, sizeof str_album,
|
rb->snprintf(str_album, sizeof str_album,
|
||||||
"Album: %s", id3.album ? id3.album : "");
|
"Album: %s", id3.album ? id3.album : "");
|
||||||
num_properties = 8;
|
num_properties += 3;
|
||||||
}
|
}
|
||||||
rb->close(fd);
|
rb->close(fd);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
found = true;
|
found = true;
|
||||||
break;
|
break;
|
||||||
|
@ -232,6 +237,7 @@ char * get_props(int selected_item, void* data, char *buffer)
|
||||||
case 4:
|
case 4:
|
||||||
rb->strcpy(buffer, its_a_dir ? "" : str_time);
|
rb->strcpy(buffer, its_a_dir ? "" : str_time);
|
||||||
break;
|
break;
|
||||||
|
#if (CONFIG_CODEC == SWCODEC)
|
||||||
case 5:
|
case 5:
|
||||||
rb->strcpy(buffer, its_a_dir ? "" : str_artist);
|
rb->strcpy(buffer, its_a_dir ? "" : str_artist);
|
||||||
break;
|
break;
|
||||||
|
@ -241,6 +247,7 @@ char * get_props(int selected_item, void* data, char *buffer)
|
||||||
case 7:
|
case 7:
|
||||||
rb->strcpy(buffer, its_a_dir ? "" : str_album);
|
rb->strcpy(buffer, its_a_dir ? "" : str_album);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
rb->strcpy(buffer, "ERROR");
|
rb->strcpy(buffer, "ERROR");
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue