summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.lua15
1 files changed, 14 insertions, 1 deletions
diff --git a/main.lua b/main.lua
index 7d62c3b..09b0936 100644
--- a/main.lua
+++ b/main.lua
@@ -842,7 +842,9 @@ local function play_stream(stream)
-- add a per-file option containing the stream id, allowing it to be
-- retrieved when a start-file event is received
local url
- if stream.stream_type == 'series' then
+ if stream.stream_url then
+ url = stream.stream_url
+ elseif stream.stream_type == 'series' then
url = xc_server .. '/series/' .. xc_user .. '/' .. xc_pass ..
'/' .. stream.stream_id .. '.vod'
else
@@ -1077,6 +1079,17 @@ local function open_option_movie_info(opt)
end
end
+ if info.youtube_trailer and info.youtube_trailer ~= '' then
+ local url = 'https://youtu.be/' .. info.youtube_trailer
+ options[#options+1] = {name=' '}
+ options[#options+1] = {
+ name='Trailer: ' .. url,
+ type='stream',
+ id='youtube:' .. info.youtube_trailer,
+ stream_url=url,
+ }
+ end
+
local m = {
options=options,
title='Movie Info: ' .. opt.name,