Added support for youtube trailers

This commit is contained in:
angelblue05 2015-06-17 00:35:07 -05:00
parent 874aab05d5
commit 591214590e

View file

@ -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', " ")