pep8 nihonnooto

This commit is contained in:
Florent 2013-12-16 12:19:04 +01:00
commit da0ecfd6a7

View file

@ -23,6 +23,7 @@ from weboob.capabilities.audiostream import BaseAudioStream, AudioStreamInfo
__all__ = ['LivePage', 'ProgramPage'] __all__ = ['LivePage', 'ProgramPage']
class LivePage(BasePage): class LivePage(BasePage):
def iter_radios_list(self): def iter_radios_list(self):
radio = Radio('nihon') radio = Radio('nihon')
@ -37,11 +38,11 @@ class LivePage(BasePage):
mime_type = unicode(el.attrib['type']) mime_type = unicode(el.attrib['type'])
stream_url = unicode(el.attrib['src']) stream_url = unicode(el.attrib['src'])
stream = BaseAudioStream(index) stream = BaseAudioStream(index)
stream.bitrate=128 stream.bitrate = 128
if ( mime_type == u'audio/mpeg' ): if (mime_type == u'audio/mpeg'):
stream.format=u'mp3' stream.format = u'mp3'
elif ( mime_type == u'audio/ogg' ): elif (mime_type == u'audio/ogg'):
stream.format=u'vorbis' stream.format = u'vorbis'
stream.title = radio.title + ' ' + mime_type stream.title = radio.title + ' ' + mime_type
stream.url = stream_url stream.url = stream_url
radio.streams.append(stream) radio.streams.append(stream)
@ -49,7 +50,6 @@ class LivePage(BasePage):
yield radio yield radio
class ProgramPage(BasePage): class ProgramPage(BasePage):
def get_current_emission(self): def get_current_emission(self):
current = AudioStreamInfo(0) current = AudioStreamInfo(0)