summaryrefslogtreecommitdiff
path: root/apps/metadata/mp4.c
diff options
context:
space:
mode:
authorDan Everton <dan@iocaine.org>2007-08-03 10:00:42 +0000
committerDan Everton <dan@iocaine.org>2007-08-03 10:00:42 +0000
commitf4a61f0c4a999790f07d061352100ac6310a38f6 (patch)
tree0cf03d0a08f5b5de7318ed5db948fd41c5196cca /apps/metadata/mp4.c
parent1fbf847eedd90b6f3e40decd64e1094d7a7dc383 (diff)
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/metadata/mp4.c')
-rw-r--r--apps/metadata/mp4.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/metadata/mp4.c b/apps/metadata/mp4.c
index 591d020373..3293007870 100644
--- a/apps/metadata/mp4.c
+++ b/apps/metadata/mp4.c
@@ -43,6 +43,7 @@
#define MP4_cwrt MP4_ID(0xa9, 'w', 'r', 't')
#define MP4_ccmt MP4_ID(0xa9, 'c', 'm', 't')
#define MP4_cday MP4_ID(0xa9, 'd', 'a', 'y')
+#define MP4_disk MP4_ID('d', 'i', 's', 'k')
#define MP4_esds MP4_ID('e', 's', 'd', 's')
#define MP4_ftyp MP4_ID('f', 't', 'y', 'p')
#define MP4_gnre MP4_ID('g', 'n', 'r', 'e')
@@ -422,6 +423,15 @@ static bool read_mp4_tags(int fd, struct mp3entry* id3,
&id3->genre_string);
break;
+ case MP4_disk:
+ {
+ unsigned short n[2];
+
+ read_mp4_tag(fd, size, (char*) &n, sizeof(n));
+ id3->disknum = betoh16(n[1]);
+ }
+ break;
+
case MP4_trkn:
{
unsigned short n[2];