mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-26 02:36:10 +00:00
Different studio fix
PlayUtils was erroring on empty list - this is a better fix than the last i think
This commit is contained in:
parent
200040dd62
commit
62b3f8da2d
2 changed files with 5 additions and 4 deletions
|
@ -94,12 +94,10 @@ class API():
|
||||||
if item.get("SeriesStudio") != None and item.get("SeriesStudio") != '':
|
if item.get("SeriesStudio") != None and item.get("SeriesStudio") != '':
|
||||||
studios.append(item.get("SeriesStudio"))
|
studios.append(item.get("SeriesStudio"))
|
||||||
else:
|
else:
|
||||||
if(item.get("Studios") != [] and item.get("Studios") != None):
|
if(item.get("Studios") != []):
|
||||||
for studio_string in item.get("Studios"):
|
for studio_string in item.get("Studios"):
|
||||||
temp=studio_string.get("Name")
|
temp=studio_string.get("Name")
|
||||||
studios.append(temp)
|
studios.append(temp)
|
||||||
else:
|
|
||||||
studios.append("")
|
|
||||||
return studios
|
return studios
|
||||||
|
|
||||||
def getMediaStreams(self, item, mediaSources=False):
|
def getMediaStreams(self, item, mediaSources=False):
|
||||||
|
|
|
@ -144,7 +144,10 @@ class PlaybackUtils():
|
||||||
|
|
||||||
# Process Studios
|
# Process Studios
|
||||||
studios = API().getStudios(result)
|
studios = API().getStudios(result)
|
||||||
studio = studios[0]
|
if studios == []:
|
||||||
|
studio = ""
|
||||||
|
else:
|
||||||
|
studio = studios[0]
|
||||||
listItem.setInfo('video', {'studio' : studio})
|
listItem.setInfo('video', {'studio' : studio})
|
||||||
|
|
||||||
# play info
|
# play info
|
||||||
|
|
Loading…
Reference in a new issue