diff options
author | makefu <root@pigstarter.de> | 2013-12-10 19:49:34 +0100 |
---|---|---|
committer | makefu <root@pigstarter.de> | 2013-12-10 19:49:34 +0100 |
commit | e847dd73730eb638d75e2d0cbc36340be7bb517e (patch) | |
tree | 26aa0e70c803ffb4d643e6f63ea05f8336668c57 /god/streams | |
parent | 9baf5c9a0a86cb94469eea069e984cc7253635b8 (diff) | |
parent | 93649c0d464de3b62dfd7fbc717386e6905bbbd2 (diff) |
Merge branch 'master' of https://github.com/krebscode/painload
Diffstat (limited to 'god/streams')
-rwxr-xr-x | god/streams/bin/relaxxapi.py | 4 | ||||
-rwxr-xr-x | god/streams/bin/streams | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/god/streams/bin/relaxxapi.py b/god/streams/bin/relaxxapi.py index f367caef..55e628b0 100755 --- a/god/streams/bin/relaxxapi.py +++ b/god/streams/bin/relaxxapi.py @@ -78,7 +78,7 @@ class relaxx: def get_first(self): return json.loads(self._playlist("getPlaylistInfo","0",""))[0] - def get_first(self): + def get_last(self): return json.loads(self._playlist("getPlaylistInfo","0",""))[-1] def clear(self): @@ -124,7 +124,7 @@ class relaxx: if state["status"]["state"] == "play" : ident = state["status"]["song"] current = state["playlist"]["file"][int(ident)] - return current.get("Name",current.get("Artist")) + " - " + current["Title"] + return current.get("Name",current.get("Artist","unkown artist")) + " - " + current.get("Title","unknown title") else: return "" diff --git a/god/streams/bin/streams b/god/streams/bin/streams index ea6e9a90..8e00a733 100755 --- a/god/streams/bin/streams +++ b/god/streams/bin/streams @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 import os import sys from subprocess import Popen, PIPE |