1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-17 18:45:10 +00:00

fix mpd_smart bug #1822773

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@984 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Philip Kovacs 2007-10-31 22:49:09 +00:00
parent 156eb02742
commit 73e578ee19
2 changed files with 19 additions and 5 deletions

View File

@ -1,5 +1,8 @@
# $Id$ # $Id$
2007-10-31
* Fix mpd_smart bug #1822773.
2007-10-23 2007-10-23
* Externalize default config file: ${sysconfdir}/conky/conky.conf * Externalize default config file: ${sysconfdir}/conky/conky.conf

View File

@ -5089,11 +5089,22 @@ static void generate_text_internal(char *p, int p_max_size, struct text_object *
255.0f)); 255.0f));
} }
OBJ(mpd_smart) { OBJ(mpd_smart) {
if (strlen(cur->mpd.title) < 2 && strlen(cur->mpd.artist) < 2) { memset (p, 0, p_max_size);
snprintf(p, p_max_size, "%s", cur->mpd.file); if (cur->mpd.artist && *cur->mpd.artist && cur->mpd.title && *cur->mpd.title) {
} else { snprintf(p, p_max_size, "%s - %s", cur->mpd.artist, cur->mpd.title);
snprintf(p, p_max_size, "%s - %s", cur->mpd.artist, cur->mpd.title); }
} else if (cur->mpd.title && *cur->mpd.title) {
snprintf(p, p_max_size, "%s", cur->mpd.title);
}
else if (cur->mpd.artist && *cur->mpd.artist) {
snprintf(p, p_max_size, "%s", cur->mpd.artist);
}
else if (cur->mpd.file && *cur->mpd.file) {
snprintf(p, p_max_size, "%s", cur->mpd.file);
}
else {
*p=0;
}
} }
#endif #endif
#ifdef XMMS2 #ifdef XMMS2