diff options
| author | Miika Pekkarinen <miipekk@ihme.org> | 2006-04-03 06:00:56 +0000 |
|---|---|---|
| committer | Miika Pekkarinen <miipekk@ihme.org> | 2006-04-03 06:00:56 +0000 |
| commit | 70c0791c7c3f5c25a6e91a107ec566abb6d77ceb (patch) | |
| tree | 0dbb637359b62688afe8cb54f09617705867c65f /apps | |
| parent | 34ad56ddfd2e24cb9be7d4eb1f2db79b7f31c1b6 (diff) | |
| download | rockbox-70c0791c7c3f5c25a6e91a107ec566abb6d77ceb.zip rockbox-70c0791c7c3f5c25a6e91a107ec566abb6d77ceb.tar.gz rockbox-70c0791c7c3f5c25a6e91a107ec566abb6d77ceb.tar.bz2 rockbox-70c0791c7c3f5c25a6e91a107ec566abb6d77ceb.tar.xz | |
Fill the numeric tags.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9448 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/tagcache.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c index 3745d07..6567a78 100644 --- a/apps/tagcache.c +++ b/apps/tagcache.c @@ -678,11 +678,16 @@ void tagcache_search_finish(struct tagcache_search *tcs) } #ifdef HAVE_TC_RAMCACHE -static struct tagfile_entry *get_tag(struct index_entry *entry, int tag) +static struct tagfile_entry *get_tag(const struct index_entry *entry, int tag) { return (struct tagfile_entry *)&hdr->tags[tag][entry->tag_seek[tag]]; } +static long get_tag_numeric(const struct index_entry *entry, int tag) +{ + return entry->tag_seek[tag]; +} + bool tagcache_fill_tags(struct mp3entry *id3, const char *filename) { struct index_entry *entry; @@ -697,6 +702,11 @@ bool tagcache_fill_tags(struct mp3entry *id3, const char *filename) id3->album = get_tag(entry, tag_album)->tag_data; id3->genre_string = get_tag(entry, tag_genre)->tag_data; id3->composer = get_tag(entry, tag_composer)->tag_data; + id3->year = get_tag_numeric(entry, tag_year); + id3->tracknum = get_tag_numeric(entry, tag_tracknumber); + id3->bitrate = get_tag_numeric(entry, tag_bitrate); + if (id3->bitrate == 0) + id3->bitrate = 1; return true; } |