mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-25 12:10:03 +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:
parent
156eb02742
commit
73e578ee19
@ -1,5 +1,8 @@
|
||||
# $Id$
|
||||
|
||||
2007-10-31
|
||||
* Fix mpd_smart bug #1822773.
|
||||
|
||||
2007-10-23
|
||||
* Externalize default config file: ${sysconfdir}/conky/conky.conf
|
||||
|
||||
|
21
src/conky.c
21
src/conky.c
@ -5089,11 +5089,22 @@ static void generate_text_internal(char *p, int p_max_size, struct text_object *
|
||||
255.0f));
|
||||
}
|
||||
OBJ(mpd_smart) {
|
||||
if (strlen(cur->mpd.title) < 2 && strlen(cur->mpd.artist) < 2) {
|
||||
snprintf(p, p_max_size, "%s", cur->mpd.file);
|
||||
} else {
|
||||
snprintf(p, p_max_size, "%s - %s", cur->mpd.artist, cur->mpd.title);
|
||||
}
|
||||
memset (p, 0, p_max_size);
|
||||
if (cur->mpd.artist && *cur->mpd.artist && cur->mpd.title && *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
|
||||
#ifdef XMMS2
|
||||
|
Loading…
Reference in New Issue
Block a user