diff options
Diffstat (limited to 'apps/wps-display.c')
-rw-r--r-- | apps/wps-display.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/apps/wps-display.c b/apps/wps-display.c index 841196f46a..10a4ca045f 100644 --- a/apps/wps-display.c +++ b/apps/wps-display.c | |||
@@ -343,7 +343,7 @@ static char* get_dir(char* buf, int buf_size, const char* path, int level) | |||
343 | 343 | ||
344 | /* Get the tag specified by the two characters at fmt. | 344 | /* Get the tag specified by the two characters at fmt. |
345 | * | 345 | * |
346 | * id3 - ID3 data to get tag values from. | 346 | * cid3 - ID3 data to get tag values from. |
347 | * nid3 - next-song ID3 data to get tag values from. | 347 | * nid3 - next-song ID3 data to get tag values from. |
348 | * tag - string (of two characters) specifying the tag to get. | 348 | * tag - string (of two characters) specifying the tag to get. |
349 | * buf - buffer to certain tags, such as track number, play time or | 349 | * buf - buffer to certain tags, such as track number, play time or |
@@ -660,8 +660,20 @@ static char* get_tag(struct mp3entry* cid3, | |||
660 | return buf; | 660 | return buf; |
661 | } | 661 | } |
662 | break; | 662 | break; |
663 | case 'r': /* Runtime database Information */ | ||
664 | switch(tag[1]) | ||
665 | { | ||
666 | case 'p': /* Playcount */ | ||
667 | *flags |= WPS_REFRESH_STATIC; | ||
668 | snprintf(buf, buf_size, "%ld", cid3->playcount); | ||
669 | return buf; | ||
670 | case 'r': /* Rating */ | ||
671 | *flags |= WPS_REFRESH_STATIC; | ||
672 | snprintf(buf, buf_size, "%d", cid3->rating); | ||
673 | return buf; | ||
674 | } | ||
675 | break; | ||
663 | } | 676 | } |
664 | |||
665 | return NULL; | 677 | return NULL; |
666 | } | 678 | } |
667 | 679 | ||