From 17913241a1928bf918cf73339f0dfce29746fe0c Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Thu, 24 Dec 2015 16:45:18 -0600 Subject: [PATCH] Fix trailer --- resources/lib/itemtypes.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/resources/lib/itemtypes.py b/resources/lib/itemtypes.py index 9c87fb73..c978851f 100644 --- a/resources/lib/itemtypes.py +++ b/resources/lib/itemtypes.py @@ -341,8 +341,13 @@ class Movies(Items): except (KeyError, IndexError): trailer = None else: - trailerId = trailer.rsplit('=', 1)[1] - trailer = "plugin://plugin.video.youtube/play/?video_id=%s" % trailerId + try: + trailerId = trailer.rsplit('=', 1)[1] + except IndexError: + self.logMsg("Failed to process trailer: %s" % trailer) + trailer = None + else: + trailer = "plugin://plugin.video.youtube/play/?video_id=%s" % trailerId ##### GET THE FILE AND PATH #####