modify radioob to use the modified ICapRadio

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
Pierre Mazière 2013-09-09 23:10:20 +02:00 committed by Florent
commit ad81711575

View file

@ -39,17 +39,17 @@ class RadioListFormatter(PrettyFormatter):
def get_description(self, obj): def get_description(self, obj):
result = '%-30s' % obj.description result = '%-30s' % obj.description
if hasattr(obj, 'current') and not empty(obj.current): if hasattr(obj, 'current') and not empty(obj.current):
if obj.current.artist: if obj.current.who:
result += ' (Current: %s - %s)' % (obj.current.artist, obj.current.title) result += ' (Current: %s - %s)' % (obj.current.who, obj.current.what)
else: else:
result += ' (Current: %s)' % obj.current.title result += ' (Current: %s)' % obj.current.what
return result return result
class Radioob(ReplApplication): class Radioob(ReplApplication):
APPNAME = 'radioob' APPNAME = 'radioob'
VERSION = '0.h' VERSION = '0.h'
COPYRIGHT = 'Copyright(C) 2010-2012 Romain Bignon' COPYRIGHT = 'Copyright(C) 2010-2013 Romain Bignon\nCopyright(C) 2013 Pierre Maziere'
DESCRIPTION = "Console application allowing to search for web radio stations, listen to them and get information " \ DESCRIPTION = "Console application allowing to search for web radio stations, listen to them and get information " \
"like the current song." "like the current song."
SHORT_DESCRIPTION = "search, show or listen to radio stations" SHORT_DESCRIPTION = "search, show or listen to radio stations"