diff options
author | Dan Everton <dan@iocaine.org> | 2007-08-03 10:00:42 +0000 |
---|---|---|
committer | Dan Everton <dan@iocaine.org> | 2007-08-03 10:00:42 +0000 |
commit | f4a61f0c4a999790f07d061352100ac6310a38f6 (patch) | |
tree | 0cf03d0a08f5b5de7318ed5db948fd41c5196cca /apps/gui/gwps-common.c | |
parent | 1fbf847eedd90b6f3e40decd64e1094d7a7dc383 (diff) | |
download | rockbox-f4a61f0c4a999790f07d061352100ac6310a38f6.tar.gz rockbox-f4a61f0c4a999790f07d061352100ac6310a38f6.zip |
Add support for parsing the disc number tag from metadata and use of it in the database. Patch originally from FS#4961 with some minor tweaks by me.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14154 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/gwps-common.c')
-rw-r--r-- | apps/gui/gwps-common.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c index 2c5238b972..9dddff3ea2 100644 --- a/apps/gui/gwps-common.c +++ b/apps/gui/gwps-common.c | |||
@@ -876,6 +876,15 @@ static char *get_token_value(struct gui_wps *gwps, | |||
876 | case WPS_TOKEN_METADATA_GENRE: | 876 | case WPS_TOKEN_METADATA_GENRE: |
877 | return id3->genre_string; | 877 | return id3->genre_string; |
878 | 878 | ||
879 | case WPS_TOKEN_METADATA_DISC_NUMBER: | ||
880 | if (id3->disc_string) | ||
881 | return id3->disc_string; | ||
882 | if (id3->discnum) { | ||
883 | snprintf(buf, buf_size, "%d", id3->discnum); | ||
884 | return buf; | ||
885 | } | ||
886 | return NULL; | ||
887 | |||
879 | case WPS_TOKEN_METADATA_TRACK_NUMBER: | 888 | case WPS_TOKEN_METADATA_TRACK_NUMBER: |
880 | if (id3->track_string) | 889 | if (id3->track_string) |
881 | return id3->track_string; | 890 | return id3->track_string; |