Fix pretty printing of PKC playqueues not working

This commit is contained in:
croneter 2018-04-08 12:37:25 +02:00
parent 244df4184f
commit 7ae831f7c3

View file

@ -64,6 +64,8 @@ class PlaylistObjectBaseclase(object):
if isinstance(getattr(self, key), str):
answ += '\'%s\': \'%s\', ' % (key,
try_decode(getattr(self, key)))
elif isinstance(getattr(self, key), unicode):
answ += '\'%s\': \'%s\', ' % (key, getattr(self, key))
else:
# e.g. int
answ += '\'%s\': %s, ' % (key, unicode(getattr(self, key)))
@ -184,6 +186,8 @@ class Playlist_Item(object):
if isinstance(getattr(self, key), str):
answ += '\'%s\': \'%s\', ' % (key,
try_decode(getattr(self, key)))
elif isinstance(getattr(self, key), unicode):
answ += '\'%s\': \'%s\', ' % (key, getattr(self, key))
else:
# e.g. int
answ += '\'%s\': %s, ' % (key, unicode(getattr(self, key)))