diff options
-rw-r--r-- | apps/SOURCES | 4 | ||||
-rw-r--r-- | apps/metadata/id3tags.c | 2 | ||||
-rw-r--r-- | apps/metadata/metadata_common.c | 6 | ||||
-rw-r--r-- | apps/metadata/mp3.c | 6 | ||||
-rw-r--r-- | tools/database/SOURCES | 2 |
5 files changed, 14 insertions, 6 deletions
diff --git a/apps/SOURCES b/apps/SOURCES index c6a9e6a79a..2642fa16b1 100644 --- a/apps/SOURCES +++ b/apps/SOURCES | |||
@@ -171,12 +171,12 @@ usb_keymaps.c | |||
171 | gui/usb_screen.c | 171 | gui/usb_screen.c |
172 | #endif | 172 | #endif |
173 | metadata.c | 173 | metadata.c |
174 | metadata/ape.c | ||
174 | metadata/id3tags.c | 175 | metadata/id3tags.c |
176 | metadata/metadata_common.c | ||
175 | metadata/mp3.c | 177 | metadata/mp3.c |
176 | #if CONFIG_CODEC == SWCODEC | 178 | #if CONFIG_CODEC == SWCODEC |
177 | metadata/metadata_common.c | ||
178 | metadata/aiff.c | 179 | metadata/aiff.c |
179 | metadata/ape.c | ||
180 | metadata/asf.c | 180 | metadata/asf.c |
181 | metadata/adx.c | 181 | metadata/adx.c |
182 | metadata/flac.c | 182 | metadata/flac.c |
diff --git a/apps/metadata/id3tags.c b/apps/metadata/id3tags.c index a32d01589d..e54a17a5b6 100644 --- a/apps/metadata/id3tags.c +++ b/apps/metadata/id3tags.c | |||
@@ -45,9 +45,7 @@ | |||
45 | 45 | ||
46 | #include "metadata.h" | 46 | #include "metadata.h" |
47 | #include "mp3data.h" | 47 | #include "mp3data.h" |
48 | #if CONFIG_CODEC == SWCODEC | ||
49 | #include "metadata_common.h" | 48 | #include "metadata_common.h" |
50 | #endif | ||
51 | #include "metadata_parsers.h" | 49 | #include "metadata_parsers.h" |
52 | 50 | ||
53 | static unsigned long unsync(unsigned long b0, | 51 | static unsigned long unsync(unsigned long b0, |
diff --git a/apps/metadata/metadata_common.c b/apps/metadata/metadata_common.c index e1ef9a0d62..4130fcfd14 100644 --- a/apps/metadata/metadata_common.c +++ b/apps/metadata/metadata_common.c | |||
@@ -28,7 +28,9 @@ | |||
28 | #include "metadata.h" | 28 | #include "metadata.h" |
29 | #include "metadata_common.h" | 29 | #include "metadata_common.h" |
30 | #include "metadata_parsers.h" | 30 | #include "metadata_parsers.h" |
31 | #if CONFIG_CODEC == SWCODEC | ||
31 | #include "replaygain.h" | 32 | #include "replaygain.h" |
33 | #endif | ||
32 | #include "misc.h" | 34 | #include "misc.h" |
33 | 35 | ||
34 | /* Skip an ID3v2 tag if it can be found. We assume the tag is located at the | 36 | /* Skip an ID3v2 tag if it can be found. We assume the tag is located at the |
@@ -250,7 +252,7 @@ long parse_tag(const char* name, char* value, struct mp3entry* id3, | |||
250 | char* buf, long buf_remaining, enum tagtype type) | 252 | char* buf, long buf_remaining, enum tagtype type) |
251 | { | 253 | { |
252 | long len = 0; | 254 | long len = 0; |
253 | char** p; | 255 | char** p = NULL; |
254 | 256 | ||
255 | if ((((strcasecmp(name, "track") == 0) && (type == TAGTYPE_APE))) | 257 | if ((((strcasecmp(name, "track") == 0) && (type == TAGTYPE_APE))) |
256 | || ((strcasecmp(name, "tracknumber") == 0) && (type == TAGTYPE_VORBIS))) | 258 | || ((strcasecmp(name, "tracknumber") == 0) && (type == TAGTYPE_VORBIS))) |
@@ -331,11 +333,13 @@ long parse_tag(const char* name, char* value, struct mp3entry* id3, | |||
331 | { | 333 | { |
332 | p = &(id3->mb_track_id); | 334 | p = &(id3->mb_track_id); |
333 | } | 335 | } |
336 | #if CONFIG_CODEC == SWCODEC | ||
334 | else | 337 | else |
335 | { | 338 | { |
336 | len = parse_replaygain(name, value, id3, buf, buf_remaining); | 339 | len = parse_replaygain(name, value, id3, buf, buf_remaining); |
337 | p = NULL; | 340 | p = NULL; |
338 | } | 341 | } |
342 | #endif | ||
339 | 343 | ||
340 | if (p) | 344 | if (p) |
341 | { | 345 | { |
diff --git a/apps/metadata/mp3.c b/apps/metadata/mp3.c index c65fb39cd8..d20dffeb27 100644 --- a/apps/metadata/mp3.c +++ b/apps/metadata/mp3.c | |||
@@ -190,7 +190,11 @@ bool get_mp3_metadata(int fd, struct mp3entry *entry, const char *filename) | |||
190 | 190 | ||
191 | /* only seek to end of file if no id3v2 tags were found */ | 191 | /* only seek to end of file if no id3v2 tags were found */ |
192 | if (!entry->id3v2len) { | 192 | if (!entry->id3v2len) { |
193 | setid3v1title(fd, entry); | 193 | if (!setid3v1title(fd, entry)) |
194 | { | ||
195 | /* when ID3 tags are not found, search APE tags */ | ||
196 | read_ape_tags(fd, entry); | ||
197 | } | ||
194 | } | 198 | } |
195 | 199 | ||
196 | if(!entry->length || (entry->filesize < 8 )) | 200 | if(!entry->length || (entry->filesize < 8 )) |
diff --git a/tools/database/SOURCES b/tools/database/SOURCES index e66ea603e1..46c9468a01 100644 --- a/tools/database/SOURCES +++ b/tools/database/SOURCES | |||
@@ -15,7 +15,9 @@ database.c | |||
15 | ../../firmware/logf.c | 15 | ../../firmware/logf.c |
16 | ../../uisimulator/common/io.c | 16 | ../../uisimulator/common/io.c |
17 | #if CONFIG_CODEC != SWCODEC | 17 | #if CONFIG_CODEC != SWCODEC |
18 | ../../apps/metadata/ape.c | ||
18 | ../../apps/metadata/id3tags.c | 19 | ../../apps/metadata/id3tags.c |
20 | ../../apps/metadata/metadata_common.c | ||
19 | ../../apps/metadata/mp3.c | 21 | ../../apps/metadata/mp3.c |
20 | #endif | 22 | #endif |
21 | /* Caution. metadata files do not add!! */ | 23 | /* Caution. metadata files do not add!! */ |