PEP fixes

This commit is contained in:
tomkat83 2017-05-01 11:05:51 +02:00
parent af1766697f
commit 587514a05e

View file

@ -292,11 +292,15 @@ class PlayUtils():
if type == "2": if type == "2":
codec = stream.attrib.get('codec') codec = stream.attrib.get('codec')
channelLayout = stream.attrib.get('audioChannelLayout', "") channelLayout = stream.attrib.get('audioChannelLayout', "")
try: try:
track = "%s %s - %s %s" % (audioNum+1, stream.attrib['language'], codec, channelLayout) track = "%s %s - %s %s" % (audioNum+1,
stream.attrib['language'],
codec,
channelLayout)
except: except:
track = "%s 'unknown' - %s %s" % (audioNum+1, codec, channelLayout) track = "%s 'unknown' - %s %s" % (audioNum+1,
codec,
channelLayout)
audioStreamsList.append(index) audioStreamsList.append(index)
audioStreams.append(tryEncode(track)) audioStreams.append(tryEncode(track))
audioNum += 1 audioNum += 1
@ -306,8 +310,8 @@ class PlayUtils():
try: try:
track = "%s %s" % (subNum+1, stream.attrib['language']) track = "%s %s" % (subNum+1, stream.attrib['language'])
except: except:
track = "%s 'unknown' (%s)" % (subNum+1, stream.attrib.get('codec')) track = "%s 'unknown' (%s)" % (subNum+1,
stream.attrib.get('codec'))
default = stream.attrib.get('default') default = stream.attrib.get('default')
forced = stream.attrib.get('forced') forced = stream.attrib.get('forced')
downloadable = stream.attrib.get('key') downloadable = stream.attrib.get('key')
@ -334,9 +338,11 @@ class PlayUtils():
if resp > -1: if resp > -1:
# User selected audio # User selected audio
playurlprefs['audioStreamID'] = audioStreamsList[resp] playurlprefs['audioStreamID'] = audioStreamsList[resp]
else: # User backed out of selection - let PMS decide else:
# User backed out of selection - let PMS decide
pass pass
else: # There's only one audiotrack. else:
# There's only one audiotrack.
playurlprefs['audioStreamID'] = audioStreamsList[0] playurlprefs['audioStreamID'] = audioStreamsList[0]
# Add audio boost # Add audio boost