Fix trailers
This commit is contained in:
parent
c059856691
commit
bf56160690
1 changed files with 9 additions and 8 deletions
|
@ -645,14 +645,15 @@ class API(object):
|
||||||
"""
|
"""
|
||||||
Returns the ratingKey (plex_id) of the trailer or None
|
Returns the ratingKey (plex_id) of the trailer or None
|
||||||
"""
|
"""
|
||||||
for extra in self.item.iterfind('Extras'):
|
for extras in self.item.iterfind('Extras'):
|
||||||
try:
|
for extra in extras:
|
||||||
typus = int(extra.attrib['extraType'])
|
try:
|
||||||
except (KeyError, TypeError):
|
typus = int(extra.attrib['extraType'])
|
||||||
typus = None
|
except (KeyError, TypeError):
|
||||||
if typus != 1:
|
typus = None
|
||||||
continue
|
if typus != 1:
|
||||||
return extra.get('ratingKey')
|
continue
|
||||||
|
return extra.get('ratingKey')
|
||||||
|
|
||||||
def mediastreams(self):
|
def mediastreams(self):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue