mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-24 17:56:11 +00:00
Fix to local trailers
For some reason, server reports local trailer, then querying may or may not return a result
This commit is contained in:
parent
a7f70a3145
commit
7c6451e839
1 changed files with 6 additions and 2 deletions
|
@ -337,7 +337,11 @@ class Movies(Items):
|
||||||
% itemid
|
% itemid
|
||||||
)
|
)
|
||||||
result = self.doUtils.downloadUrl(url)
|
result = self.doUtils.downloadUrl(url)
|
||||||
trailer = "plugin://plugin.video.emby/trailer/?id=%s&mode=play" % result[0]['Id']
|
try:
|
||||||
|
trailer = "plugin://plugin.video.emby/trailer/?id=%s&mode=play" % result[0]['Id']
|
||||||
|
except IndexError:
|
||||||
|
self.logMsg("Failed to process local trailer.", 1)
|
||||||
|
trailer = None
|
||||||
else:
|
else:
|
||||||
# Try to get the youtube trailer
|
# Try to get the youtube trailer
|
||||||
try:
|
try:
|
||||||
|
@ -348,7 +352,7 @@ class Movies(Items):
|
||||||
try:
|
try:
|
||||||
trailerId = trailer.rsplit('=', 1)[1]
|
trailerId = trailer.rsplit('=', 1)[1]
|
||||||
except IndexError:
|
except IndexError:
|
||||||
self.logMsg("Failed to process trailer: %s" % trailer)
|
self.logMsg("Failed to process trailer: %s" % trailer, 1)
|
||||||
trailer = None
|
trailer = None
|
||||||
else:
|
else:
|
||||||
trailer = "plugin://plugin.video.youtube/play/?video_id=%s" % trailerId
|
trailer = "plugin://plugin.video.youtube/play/?video_id=%s" % trailerId
|
||||||
|
|
Loading…
Reference in a new issue