summaryrefslogtreecommitdiff
path: root/playlist.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-12-31 15:00:01 +0100
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-12-31 15:00:01 +0100
commitf308147adc4b195efbf78a7efc7e872306f0f286 (patch)
treea65dba43e99458001e680baa4f4a2e4d42926011 /playlist.c
parent05c0feb93d80af62d8ddca0bcfc2e44d47e6fd2e (diff)
added year, genre, comment, copyright conversions to pl_format_title
Diffstat (limited to 'playlist.c')
-rw-r--r--playlist.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/playlist.c b/playlist.c
index e87b7da8..c6e9438b 100644
--- a/playlist.c
+++ b/playlist.c
@@ -1640,6 +1640,10 @@ pl_format_title (playItem_t *it, char *s, int size, int id, const char *fmt) {
const char *track = NULL;
const char *title = NULL;
const char *duration = NULL;
+ const char *year = NULL;
+ const char *genre = NULL;
+ const char *comment = NULL;
+ const char *copyright = NULL;
if (id != -1) {
const char *text = NULL;
@@ -1715,6 +1719,18 @@ pl_format_title (playItem_t *it, char *s, int size, int id, const char *fmt) {
else if (*fmt == 'n') {
meta = (track = pl_get_meta_cached (it, "track", track, ""));
}
+ else if (*fmt == 'y') {
+ meta = (year = pl_get_meta_cached (it, "year", year, ""));
+ }
+ else if (*fmt == 'g') {
+ meta = (genre = pl_get_meta_cached (it, "genre", genre, ""));
+ }
+ else if (*fmt == 'c') {
+ meta = (comment = pl_get_meta_cached (it, "comment", comment, ""));
+ }
+ else if (*fmt == 'r') {
+ meta = (copyright = pl_get_meta_cached (it, "copyright", copyright, ""));
+ }
else if (*fmt == 'l') {
const char *value = (duration = pl_format_duration (it, duration, dur, sizeof (dur)));
while (n > 0 && *value) {