summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Huuhko <kai.huuhko@gmail.com>2013-11-23 19:48:11 +0200
committerKai Huuhko <kai.huuhko@gmail.com>2013-11-23 19:48:11 +0200
commit018d6bd9d76f1e23ad5108f9e45415e1d10acce7 (patch)
tree299f352669b12ae26ffda5c33271cc9095fdce75
parent4263aaaaf70c06ab23f182fb5158589f6620bc77 (diff)
audio/xchat-mpris2.py: Adjust the string according to metadata available
-rwxr-xr-x[-rw-r--r--]audio/xchat-mpris2.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/audio/xchat-mpris2.py b/audio/xchat-mpris2.py
index 9f1feb9..5b6647e 100644..100755
--- a/audio/xchat-mpris2.py
+++ b/audio/xchat-mpris2.py
@@ -90,7 +90,14 @@ def mprisPlayerVersion(word, word_eol, userdata):
90def mprisNp(word, word_eol, userdata): 90def mprisNp(word, word_eol, userdata):
91 info = getSongInfo() 91 info = getSongInfo()
92 if not info == False: 92 if not info == False:
93 xchat.command("ME is listening to {0} - {1} [{2}] [{3}/{4}] with {5}".format(*info)) 93 s = "ME is listening to "
94 s = s + info[1]
95 if info[0] != "":
96 s = s + " by " + info[0]
97 if info[2] != "":
98 s = s + " [" + info[2] + "]"
99 s = s + " [{3}/{4}] with {5}".format(*info)
100 xchat.command(s)
94 else: 101 else:
95 xchat.prnt("Error in getSongInfo()") 102 xchat.prnt("Error in getSongInfo()")
96 return xchat.EAT_ALL 103 return xchat.EAT_ALL