diff options
author | Ricardo Constantino <wiiaboo@gmail.com> | 2017-07-08 14:42:04 +0100 |
---|---|---|
committer | Ricardo Constantino <wiiaboo@gmail.com> | 2017-07-11 14:16:35 +0100 |
commit | b1165ce3a22194d1f929c9af7ea65d19460fd941 (patch) | |
tree | 2f1fc2ad285c286e6687e614a1090c368e42dccc /player/lua | |
parent | c5dfd66e14386db904216933867075dcf887f8fb (diff) | |
download | mpv-b1165ce3a22194d1f929c9af7ea65d19460fd941.tar.bz2 mpv-b1165ce3a22194d1f929c9af7ea65d19460fd941.tar.xz |
ytdl_hook: add times for ytdl and hook running on debug-level
Not really important, but still interesting to know.
Diffstat (limited to 'player/lua')
-rw-r--r-- | player/lua/ytdl_hook.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua index c7049f1b85..11a252af00 100644 --- a/player/lua/ytdl_hook.lua +++ b/player/lua/ytdl_hook.lua @@ -243,6 +243,7 @@ end mp.add_hook("on_load", 10, function () local url = mp.get_property("stream-open-filename") + local start_time = os.clock() if (url:find("http://") == 1) or (url:find("https://") == 1) or (url:find("ytdl://") == 1) then @@ -319,6 +320,7 @@ mp.add_hook("on_load", 10, function () end msg.verbose("youtube-dl succeeded!") + msg.debug('ytdl parsing took '..os.clock()-start_time..' seconds') -- what did we get? if not (json["direct"] == nil) and (json["direct"] == true) then @@ -424,6 +426,7 @@ mp.add_hook("on_load", 10, function () add_single_video(json) end end + msg.debug('script running time: '..os.clock()-start_time..' seconds') end) |