Improve code stability
- NEVER use e.g. {} or [] as standard function arguments
This commit is contained in:
parent
90e67931ff
commit
ba191eafc7
2 changed files with 8 additions and 7 deletions
|
@ -2190,7 +2190,7 @@ class API():
|
|||
"""
|
||||
return self.item[0].attrib.get('optimizedForStreaming') == '1'
|
||||
|
||||
def getTranscodeVideoPath(self, action, quality={}):
|
||||
def getTranscodeVideoPath(self, action, quality=None):
|
||||
"""
|
||||
|
||||
To be called on a VIDEO level of PMS xml response!
|
||||
|
@ -2211,6 +2211,8 @@ class API():
|
|||
|
||||
TODO: mediaIndex
|
||||
"""
|
||||
if quality is None:
|
||||
quality = {}
|
||||
xargs = clientinfo.ClientInfo().getXArgsDeviceInfo()
|
||||
# For DirectPlay, path/key of PART is needed
|
||||
# trailers are 'clip' with PMS xmls
|
||||
|
|
|
@ -55,14 +55,13 @@ class PlayUtils():
|
|||
|
||||
else:
|
||||
self.logMsg("File is transcoding.", 1)
|
||||
quality = {
|
||||
'maxVideoBitrate': self.getBitrate(),
|
||||
'videoResolution': self.getResolution(),
|
||||
'videoQuality': '100'
|
||||
}
|
||||
playurl = utils.tryEncode(self.API.getTranscodeVideoPath(
|
||||
'Transcode',
|
||||
quality=quality))
|
||||
quality={
|
||||
'maxVideoBitrate': self.getBitrate(),
|
||||
'videoResolution': self.getResolution(),
|
||||
'videoQuality': '100'
|
||||
}))
|
||||
# Set playmethod property
|
||||
utils.window('emby_%s.playmethod' % playurl, value="Transcode")
|
||||
|
||||
|
|
Loading…
Reference in a new issue