From f9f96325e20be46d1cf12492818485f2f84c3c3a Mon Sep 17 00:00:00 2001 From: Michael Hohmuth Date: Mon, 6 Jun 2011 23:03:31 +0000 Subject: FS#12107: Remove track-number guessing code. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29982 a1c6a512-1295-4272-9138-f99709370657 --- apps/tagcache.c | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) (limited to 'apps') 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 */ -- cgit v1.2.3