fix stream selection in radioob

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

View file

@ -83,12 +83,14 @@ class Radioob(ReplApplication):
if not _id:
print >>sys.stderr, 'This command takes an argument: %s' % self.get_command_help('play', short=True)
return 2
_stream_id = 0
if _stream_id:
try:
_stream_id = int(_stream_id)
except:
_stream_id = 0
pass
else:
_stream_id = 0
radio = self.get_object(_id, 'get_radio', ['streams'])
if not radio: