summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/SOURCES4
-rw-r--r--apps/metadata/id3tags.c2
-rw-r--r--apps/metadata/metadata_common.c6
-rw-r--r--apps/metadata/mp3.c6
4 files changed, 6 insertions, 12 deletions
diff --git a/apps/SOURCES b/apps/SOURCES
index 2bd4018751..98efec944a 100644
--- a/apps/SOURCES
+++ b/apps/SOURCES
@@ -174,12 +174,12 @@ usb_keymaps.c
174gui/usb_screen.c 174gui/usb_screen.c
175#endif 175#endif
176metadata.c 176metadata.c
177metadata/ape.c
178metadata/id3tags.c 177metadata/id3tags.c
179metadata/metadata_common.c
180metadata/mp3.c 178metadata/mp3.c
181#if CONFIG_CODEC == SWCODEC 179#if CONFIG_CODEC == SWCODEC
180metadata/metadata_common.c
182metadata/aiff.c 181metadata/aiff.c
182metadata/ape.c
183metadata/asf.c 183metadata/asf.c
184metadata/adx.c 184metadata/adx.c
185metadata/flac.c 185metadata/flac.c
diff --git a/apps/metadata/id3tags.c b/apps/metadata/id3tags.c
index e54a17a5b6..a32d01589d 100644
--- a/apps/metadata/id3tags.c
+++ b/apps/metadata/id3tags.c
@@ -45,7 +45,9 @@
45 45
46#include "metadata.h" 46#include "metadata.h"
47#include "mp3data.h" 47#include "mp3data.h"
48#if CONFIG_CODEC == SWCODEC
48#include "metadata_common.h" 49#include "metadata_common.h"
50#endif
49#include "metadata_parsers.h" 51#include "metadata_parsers.h"
50 52
51static unsigned long unsync(unsigned long b0, 53static unsigned long unsync(unsigned long b0,
diff --git a/apps/metadata/metadata_common.c b/apps/metadata/metadata_common.c
index 4130fcfd14..e1ef9a0d62 100644
--- a/apps/metadata/metadata_common.c
+++ b/apps/metadata/metadata_common.c
@@ -28,9 +28,7 @@
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
32#include "replaygain.h" 31#include "replaygain.h"
33#endif
34#include "misc.h" 32#include "misc.h"
35 33
36/* Skip an ID3v2 tag if it can be found. We assume the tag is located at the 34/* Skip an ID3v2 tag if it can be found. We assume the tag is located at the
@@ -252,7 +250,7 @@ long parse_tag(const char* name, char* value, struct mp3entry* id3,
252 char* buf, long buf_remaining, enum tagtype type) 250 char* buf, long buf_remaining, enum tagtype type)
253{ 251{
254 long len = 0; 252 long len = 0;
255 char** p = NULL; 253 char** p;
256 254
257 if ((((strcasecmp(name, "track") == 0) && (type == TAGTYPE_APE))) 255 if ((((strcasecmp(name, "track") == 0) && (type == TAGTYPE_APE)))
258 || ((strcasecmp(name, "tracknumber") == 0) && (type == TAGTYPE_VORBIS))) 256 || ((strcasecmp(name, "tracknumber") == 0) && (type == TAGTYPE_VORBIS)))
@@ -333,13 +331,11 @@ long parse_tag(const char* name, char* value, struct mp3entry* id3,
333 { 331 {
334 p = &(id3->mb_track_id); 332 p = &(id3->mb_track_id);
335 } 333 }
336#if CONFIG_CODEC == SWCODEC
337 else 334 else
338 { 335 {
339 len = parse_replaygain(name, value, id3, buf, buf_remaining); 336 len = parse_replaygain(name, value, id3, buf, buf_remaining);
340 p = NULL; 337 p = NULL;
341 } 338 }
342#endif
343 339
344 if (p) 340 if (p)
345 { 341 {
diff --git a/apps/metadata/mp3.c b/apps/metadata/mp3.c
index d20dffeb27..c65fb39cd8 100644
--- a/apps/metadata/mp3.c
+++ b/apps/metadata/mp3.c
@@ -190,11 +190,7 @@ 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 if (!setid3v1title(fd, entry)) 193 setid3v1title(fd, entry);
194 {
195 /* when ID3 tags are not found, search APE tags */
196 read_ape_tags(fd, entry);
197 }
198 } 194 }
199 195
200 if(!entry->length || (entry->filesize < 8 )) 196 if(!entry->length || (entry->filesize < 8 ))