summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-06-27 21:09:12 +0200
committerwm4 <wm4@nowhere>2015-06-27 21:09:12 +0200
commit1921f40db58dfbbd55170d9bfde6e14559d74a7d (patch)
tree967960903ac78a8d35b41528a21f72047eb6e630 /player
parent03c70a8d81f14ce46bc3410b08f5956d6af34d82 (diff)
downloadmpv-1921f40db58dfbbd55170d9bfde6e14559d74a7d.tar.bz2
mpv-1921f40db58dfbbd55170d9bfde6e14559d74a7d.tar.xz
ytdl: don't print failure warning when youtube-dl was killed by us
Diffstat (limited to 'player')
-rw-r--r--player/lua/ytdl_hook.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua
index 967a20a226..9cf76b3ea1 100644
--- a/player/lua/ytdl_hook.lua
+++ b/player/lua/ytdl_hook.lua
@@ -9,7 +9,7 @@ local ytdl = {
local function exec(args)
local ret = utils.subprocess({args = args})
- return ret.status, ret.stdout
+ return ret.status, ret.stdout, ret
end
-- return if it was explicitly set on the command line
@@ -123,10 +123,12 @@ mp.add_hook("on_load", 10, function ()
end
table.insert(command, "--")
table.insert(command, url)
- local es, json = exec(command)
+ local es, json, result = exec(command)
if (es < 0) or (json == nil) or (json == "") then
- msg.warn("youtube-dl failed, trying to play URL directly ...")
+ if not result.killed_by_us then
+ msg.warn("youtube-dl failed, trying to play URL directly ...")
+ end
return
end