summaryrefslogtreecommitdiff
path: root/playlist.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-08-10 19:43:57 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-08-10 19:43:57 +0200
commit10e9f75e95606cc80a461cc055c56abb17bb701c (patch)
treef4f709ddcc483e16b86e9ff1246d43df92cb386c /playlist.c
parentbd81f6d8c7e95b2daa2462d2cd1c582e0f412ffb (diff)
added custom titlebar / systray text
Diffstat (limited to 'playlist.c')
-rw-r--r--playlist.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/playlist.c b/playlist.c
index 5446b3f6..29ca4560 100644
--- a/playlist.c
+++ b/playlist.c
@@ -2451,7 +2451,7 @@ pl_format_title_int (const char *escape_chars, playItem_t *it, int idx, char *s,
char *ss = s;
LOCK;
- if (id != -1) {
+ if (id != -1 && it) {
const char *text = NULL;
switch (id) {
case DB_COLUMN_FILENUMBER:
@@ -2493,6 +2493,9 @@ pl_format_title_int (const char *escape_chars, playItem_t *it, int idx, char *s,
if (*fmt == 0) {
break;
}
+ else if (!it && !strchr ("V", *fmt)) {
+ // only %V (version) works without track pointer
+ }
else if (*fmt == 'a') {
meta = pl_find_meta (it, "artist");
if (!meta) {
@@ -2651,6 +2654,9 @@ pl_format_title_int (const char *escape_chars, playItem_t *it, int idx, char *s,
meta = dirname;
}
}
+ else if (*fmt == 'V') {
+ meta = VERSION;
+ }
else {
*s++ = *fmt;
n--;