summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorRicardo Constantino <wiiaboo@gmail.com>2015-07-29 00:00:13 +0100
committerwm4 <wm4@nowhere>2015-07-29 13:20:09 +0200
commit81bfe4da8fa0637129a5619d8dde0af97b5f5fa2 (patch)
tree8da3894fde98321c161b5ce5368781d7344ec45a /player
parent794dbd847a3add3eaf469b561cd6fc542ae35717 (diff)
downloadmpv-81bfe4da8fa0637129a5619d8dde0af97b5f5fa2.tar.bz2
mpv-81bfe4da8fa0637129a5619d8dde0af97b5f5fa2.tar.xz
ytdl: get start_time
Diffstat (limited to 'player')
-rw-r--r--player/lua/ytdl_hook.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua
index 57e9d00625..0e3bdd2e8c 100644
--- a/player/lua/ytdl_hook.lua
+++ b/player/lua/ytdl_hook.lua
@@ -259,6 +259,12 @@ mp.add_hook("on_load", 10, function ()
end
end
+ -- set start and end time
+ if not (json.start_time == nil) then
+ msg.debug("setting start to: " .. json.start_time .. " secs")
+ mp.set_property("file-local-options/start",json.start_time)
+ end
+
-- for rtmp
if not (json.play_path == nil) then
local rtmp_prop = append_rtmp_prop(nil, "rtmp_tcurl", streamurl)