diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/tagcache.c | 9 | ||||
-rw-r--r-- | apps/tagcache.h | 1 | ||||
-rw-r--r-- | apps/tagnavi.config | 4 | ||||
-rw-r--r-- | apps/tagtree.c | 2 |
4 files changed, 14 insertions, 2 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c index 7a1fec75af..c22091ecf5 100644 --- a/apps/tagcache.c +++ b/apps/tagcache.c | |||
@@ -116,6 +116,7 @@ static const int unique_tags[] = { tag_artist, tag_album, tag_genre, | |||
116 | /* Numeric tags (we can use these tags with conditional clauses). */ | 116 | /* Numeric tags (we can use these tags with conditional clauses). */ |
117 | static const int numeric_tags[] = { tag_year, tag_tracknumber, tag_length, | 117 | static const int numeric_tags[] = { tag_year, tag_tracknumber, tag_length, |
118 | tag_bitrate, tag_playcount, tag_rating, tag_playtime, tag_lastplayed, tag_commitid, | 118 | tag_bitrate, tag_playcount, tag_rating, tag_playtime, tag_lastplayed, tag_commitid, |
119 | tag_virt_length_min, tag_virt_length_sec, | ||
119 | tag_virt_entryage, tag_virt_autoscore }; | 120 | tag_virt_entryage, tag_virt_autoscore }; |
120 | 121 | ||
121 | /* String presentation of the tags defined in tagcache.h. Must be in correct order! */ | 122 | /* String presentation of the tags defined in tagcache.h. Must be in correct order! */ |
@@ -659,6 +660,14 @@ static long check_virtual_tags(int tag, const struct index_entry *idx) | |||
659 | 660 | ||
660 | switch (tag) | 661 | switch (tag) |
661 | { | 662 | { |
663 | case tag_virt_length_sec: | ||
664 | data = (idx->tag_seek[tag_length]/1000) % 60; | ||
665 | break; | ||
666 | |||
667 | case tag_virt_length_min: | ||
668 | data = (idx->tag_seek[tag_length]/1000) / 60; | ||
669 | break; | ||
670 | |||
662 | case tag_virt_autoscore: | 671 | case tag_virt_autoscore: |
663 | if (idx->tag_seek[tag_length] == 0 | 672 | if (idx->tag_seek[tag_length] == 0 |
664 | || idx->tag_seek[tag_playcount] == 0) | 673 | || idx->tag_seek[tag_playcount] == 0) |
diff --git a/apps/tagcache.h b/apps/tagcache.h index 7b7aa021c3..f449f1344e 100644 --- a/apps/tagcache.h +++ b/apps/tagcache.h | |||
@@ -27,6 +27,7 @@ enum tag_type { tag_artist = 0, tag_album, tag_genre, tag_title, | |||
27 | tag_tracknumber, tag_bitrate, tag_length, tag_playcount, tag_rating, | 27 | tag_tracknumber, tag_bitrate, tag_length, tag_playcount, tag_rating, |
28 | tag_playtime, tag_lastplayed, tag_commitid, | 28 | tag_playtime, tag_lastplayed, tag_commitid, |
29 | /* Virtual tags */ | 29 | /* Virtual tags */ |
30 | tag_virt_length_min, tag_virt_length_sec, | ||
30 | tag_virt_entryage, tag_virt_autoscore }; | 31 | tag_virt_entryage, tag_virt_autoscore }; |
31 | 32 | ||
32 | #define TAG_COUNT 17 | 33 | #define TAG_COUNT 17 |
diff --git a/apps/tagnavi.config b/apps/tagnavi.config index 7c8e06c9e1..2c5675f5b7 100644 --- a/apps/tagnavi.config +++ b/apps/tagnavi.config | |||
@@ -6,8 +6,8 @@ | |||
6 | # get overwritten automatically. | 6 | # get overwritten automatically. |
7 | 7 | ||
8 | # Basic format declarations | 8 | # Basic format declarations |
9 | %format "fmt_title" "%02d. %s" tracknum title ? tracknum > "0" | 9 | %format "fmt_title" "%02d. %s - %02d:%02d" tracknum title Lm Ls ? tracknum > "0" |
10 | %format "fmt_title" "%s" title | 10 | %format "fmt_title" "%s - %02d:%02d" title Lm Ls |
11 | %format "fmt_mostplayed" "%2d|%3d %s (%s)" playcount autoscore title artist %sort = "inverse" %limit = "100" | 11 | %format "fmt_mostplayed" "%2d|%3d %s (%s)" playcount autoscore title artist %sort = "inverse" %limit = "100" |
12 | %format "fmt_lastplayed" "%06d%s - %s" lastplayed artist title %sort = "inverse" %limit = "99" %strip = "6" | 12 | %format "fmt_lastplayed" "%06d%s - %s" lastplayed artist title %sort = "inverse" %limit = "99" %strip = "6" |
13 | %format "fmt_forgotten" "%06d%s - %s" lastplayed artist title %limit = "99" %strip = "6" | 13 | %format "fmt_forgotten" "%06d%s - %s" lastplayed artist title %limit = "99" %strip = "6" |
diff --git a/apps/tagtree.c b/apps/tagtree.c index e9370fa443..cc8c1456e6 100644 --- a/apps/tagtree.c +++ b/apps/tagtree.c | |||
@@ -200,6 +200,8 @@ static int get_tag(int *tag) | |||
200 | MATCH(tag, buf, "ensemble", tag_albumartist); | 200 | MATCH(tag, buf, "ensemble", tag_albumartist); |
201 | MATCH(tag, buf, "genre", tag_genre); | 201 | MATCH(tag, buf, "genre", tag_genre); |
202 | MATCH(tag, buf, "length", tag_length); | 202 | MATCH(tag, buf, "length", tag_length); |
203 | MATCH(tag, buf, "Lm", tag_virt_length_min); | ||
204 | MATCH(tag, buf, "Ls", tag_virt_length_sec); | ||
203 | MATCH(tag, buf, "title", tag_title); | 205 | MATCH(tag, buf, "title", tag_title); |
204 | MATCH(tag, buf, "filename", tag_filename); | 206 | MATCH(tag, buf, "filename", tag_filename); |
205 | MATCH(tag, buf, "tracknum", tag_tracknumber); | 207 | MATCH(tag, buf, "tracknum", tag_tracknumber); |