From ac95b1ce23676d677ed0400e038b64753ab80bd6 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Wed, 17 Jun 2015 00:26:12 -0500 Subject: [PATCH] Added support for youtube trailers --- resources/lib/WriteKodiVideoDB.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/resources/lib/WriteKodiVideoDB.py b/resources/lib/WriteKodiVideoDB.py index a980ce22..c61abc25 100644 --- a/resources/lib/WriteKodiVideoDB.py +++ b/resources/lib/WriteKodiVideoDB.py @@ -123,6 +123,11 @@ class WriteKodiVideoDB(): if(jsonData != ""): trailerItem = jsonData trailerUrl = "plugin://plugin.video.emby/trailer/?id=%s&mode=play" % trailerItem[0][u'Id'] + elif MBitem.get("RemoteTrailers") != None: + trailerUrl = MBitem.get("RemoteTrailers")[0].get("Url") + if trailerUrl.startswith("http"): + trailerId = trailerUrl.split('=')[1] + trailerUrl = "plugin://plugin.video.youtube/play/?video_id=%s" % trailerId if MBitem.get("DateCreated") != None: dateadded = MBitem["DateCreated"].split('.')[0].replace('T', " ")