mirror of
https://github.com/jellyfin/jellycon.git
synced 2024-11-27 00:00:24 +00:00
Merge pull request #351 from hagaygo/fix-youtube-addon-call
Fix youtube addon call for trailer playback
This commit is contained in:
commit
29151d837a
@ -945,7 +945,10 @@ def play_action(params):
|
||||
|
||||
def play_item_trailer(item_id):
|
||||
log.debug("== ENTER: playTrailer ==")
|
||||
|
||||
handle = int(sys.argv[1]) if sys.argv and len(sys.argv) > 1 else -1
|
||||
if handle != -1:
|
||||
xbmcplugin.endOfDirectory(handle, succeeded=False, updateListing=False, cacheToDisc=False)
|
||||
|
||||
url = "/Users/{}/Items/{}/LocalTrailers?format=json".format(
|
||||
user_details.get('user_id'), item_id
|
||||
)
|
||||
@ -1021,7 +1024,7 @@ def play_item_trailer(item_id):
|
||||
elif trailer.get("type") == "remote":
|
||||
youtube_id = trailer.get("url").rsplit('=', 1)[1]
|
||||
url_root = "plugin.video.youtube/play/?video_id="
|
||||
play_url = "RunPlugin(plugin://{}{})".format(url_root, youtube_id)
|
||||
play_url = "PlayMedia(plugin://{}{})".format(url_root, youtube_id)
|
||||
log.debug("youtube_plugin: {0}".format(play_url))
|
||||
|
||||
xbmc.executebuiltin(play_url)
|
||||
|
Loading…
Reference in New Issue
Block a user