summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Hohmuth <sideral@rockbox.org>2011-06-06 23:03:31 +0000
committerMichael Hohmuth <sideral@rockbox.org>2011-06-06 23:03:31 +0000
commitf9f96325e20be46d1cf12492818485f2f84c3c3a (patch)
treeca1b2834c45375ac513689f07e1cf4fdf88d94c7
parent6a0021cf2044e2bc36883a63362cbc7657bf5fe0 (diff)
downloadrockbox-f9f96325e20be46d1cf12492818485f2f84c3c3a.tar.gz
rockbox-f9f96325e20be46d1cf12492818485f2f84c3c3a.tar.bz2
rockbox-f9f96325e20be46d1cf12492818485f2f84c3c3a.zip
FS#12107: Remove track-number guessing code.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29982 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/tagcache.c31
1 files changed, 2 insertions, 29 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c
index a3585feea5..973cc9314e 100644
--- a/apps/tagcache.c
+++ b/apps/tagcache.c
@@ -1870,36 +1870,9 @@ static void __attribute__ ((noinline)) add_tagcache(char *path,
logf("-> %s", path);
- /* Generate track number if missing. */
- if (id3.tracknum <= 0)
+ if (id3.tracknum <= 0) /* Track number missing? */
{
- const char *p = strrchr(path, '.');
-
- if (p == NULL)
- p = &path[strlen(path)-1];
-
- while (*p != '/')
- {
- if (isdigit(*p) && isdigit(*(p-1)))
- {
- tracknumfix[1] = *p--;
- tracknumfix[0] = *p;
- break;
- }
- p--;
- }
-
- if (tracknumfix[0] != '\0')
- {
- id3.tracknum = atoi(tracknumfix);
- /* Set a flag to indicate track number has been generated. */
- entry.flag |= FLAG_TRKNUMGEN;
- }
- else
- {
- /* Unable to generate track number. */
- id3.tracknum = -1;
- }
+ id3.tracknum = -1;
}
/* Numeric tags */