Added support for youtube trailers

This commit is contained in:
angelblue05 2015-06-17 00:26:12 -05:00
parent ce312bd2c8
commit ac95b1ce23

View file

@ -123,6 +123,11 @@ class WriteKodiVideoDB():
if(jsonData != ""): if(jsonData != ""):
trailerItem = jsonData trailerItem = jsonData
trailerUrl = "plugin://plugin.video.emby/trailer/?id=%s&mode=play" % trailerItem[0][u'Id'] 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: if MBitem.get("DateCreated") != None:
dateadded = MBitem["DateCreated"].split('.')[0].replace('T', " ") dateadded = MBitem["DateCreated"].split('.')[0].replace('T', " ")