summaryrefslogtreecommitdiff
path: root/apps/tagcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/tagcache.c')
-rw-r--r--apps/tagcache.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c
index 6d738bc5fb..da51e0c4e9 100644
--- a/apps/tagcache.c
+++ b/apps/tagcache.c
@@ -115,7 +115,7 @@ static const int unique_tags[] = { tag_artist, tag_album, tag_genre,
115 tag_composer, tag_comment, tag_albumartist }; 115 tag_composer, tag_comment, tag_albumartist };
116 116
117/* Numeric tags (we can use these tags with conditional clauses). */ 117/* Numeric tags (we can use these tags with conditional clauses). */
118static const int numeric_tags[] = { tag_year, tag_tracknumber, tag_length, 118static const int numeric_tags[] = { tag_year, tag_discnumber, tag_tracknumber, tag_length,
119 tag_bitrate, tag_playcount, tag_rating, tag_playtime, tag_lastplayed, tag_commitid, 119 tag_bitrate, tag_playcount, tag_rating, tag_playtime, tag_lastplayed, tag_commitid,
120 tag_virt_length_min, tag_virt_length_sec, 120 tag_virt_length_min, tag_virt_length_sec,
121 tag_virt_playtime_min, tag_virt_playtime_sec, 121 tag_virt_playtime_min, tag_virt_playtime_sec,
@@ -123,7 +123,7 @@ static const int numeric_tags[] = { tag_year, tag_tracknumber, tag_length,
123 123
124/* String presentation of the tags defined in tagcache.h. Must be in correct order! */ 124/* String presentation of the tags defined in tagcache.h. Must be in correct order! */
125static const char *tags_str[] = { "artist", "album", "genre", "title", 125static const char *tags_str[] = { "artist", "album", "genre", "title",
126 "filename", "composer", "comment", "albumartist", "year", "tracknumber", 126 "filename", "composer", "comment", "albumartist", "year", "discnumber", "tracknumber",
127 "bitrate", "length", "playcount", "rating", "playtime", "lastplayed", "commitid" }; 127 "bitrate", "length", "playcount", "rating", "playtime", "lastplayed", "commitid" };
128 128
129/* Status information of the tagcache. */ 129/* Status information of the tagcache. */
@@ -188,7 +188,7 @@ struct master_header {
188 188
189/* For the endianess correction */ 189/* For the endianess correction */
190static const char *tagfile_entry_ec = "ss"; 190static const char *tagfile_entry_ec = "ss";
191static const char *index_entry_ec = "llllllllllllllllll"; /* (1 + TAG_COUNT) * l */ 191static const char *index_entry_ec = "lllllllllllllllllll"; /* (1 + TAG_COUNT) * l */
192static const char *tagcache_header_ec = "lll"; 192static const char *tagcache_header_ec = "lll";
193static const char *master_header_ec = "llllll"; 193static const char *master_header_ec = "llllll";
194 194
@@ -1556,6 +1556,7 @@ bool tagcache_fill_tags(struct mp3entry *id3, const char *filename)
1556 id3->score = get_tag_numeric(entry, tag_virt_autoscore) / 10; 1556 id3->score = get_tag_numeric(entry, tag_virt_autoscore) / 10;
1557 id3->year = get_tag_numeric(entry, tag_year); 1557 id3->year = get_tag_numeric(entry, tag_year);
1558 1558
1559 id3->discnum = get_tag_numeric(entry, tag_discnumber);
1559 id3->tracknum = get_tag_numeric(entry, tag_tracknumber); 1560 id3->tracknum = get_tag_numeric(entry, tag_tracknumber);
1560 id3->bitrate = get_tag_numeric(entry, tag_bitrate); 1561 id3->bitrate = get_tag_numeric(entry, tag_bitrate);
1561 if (id3->bitrate == 0) 1562 if (id3->bitrate == 0)
@@ -1699,6 +1700,7 @@ static void add_tagcache(char *path)
1699 1700
1700 /* Numeric tags */ 1701 /* Numeric tags */
1701 entry.tag_offset[tag_year] = track.id3.year; 1702 entry.tag_offset[tag_year] = track.id3.year;
1703 entry.tag_offset[tag_discnumber] = track.id3.discnum;
1702 entry.tag_offset[tag_tracknumber] = track.id3.tracknum; 1704 entry.tag_offset[tag_tracknumber] = track.id3.tracknum;
1703 entry.tag_offset[tag_length] = track.id3.length; 1705 entry.tag_offset[tag_length] = track.id3.length;
1704 entry.tag_offset[tag_bitrate] = track.id3.bitrate; 1706 entry.tag_offset[tag_bitrate] = track.id3.bitrate;