From 591214590e2f0bc8c2e48a4f8474477c3dff88ca Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Wed, 17 Jun 2015 00:35:07 -0500 Subject: [PATCH] Added support for youtube trailers --- resources/lib/WriteKodiVideoDB.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/resources/lib/WriteKodiVideoDB.py b/resources/lib/WriteKodiVideoDB.py index a980ce22..e135ec5f 100644 --- a/resources/lib/WriteKodiVideoDB.py +++ b/resources/lib/WriteKodiVideoDB.py @@ -123,6 +123,13 @@ 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: + try: + trailerUrl = MBitem.get("RemoteTrailers")[0].get("Url") + trailerId = trailerUrl.split('=')[1] + trailerUrl = "plugin://plugin.video.youtube/play/?video_id=%s" % trailerId + except: + trailerUrl = MBitem.get("RemoteTrailers")[0].get("Url") if MBitem.get("DateCreated") != None: dateadded = MBitem["DateCreated"].split('.')[0].replace('T', " ")