From 07ddfd4f8afd6047c9d22249a9b1923ea6221643 Mon Sep 17 00:00:00 2001 From: ChrisK2 Date: Wed, 26 Nov 2014 17:17:05 +0100 Subject: ytdl: When using DASH, print actual duration prints the actual duration as reported by youtube-dl to the terminal when available --- player/lua/ytdl_hook.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'player/lua/ytdl_hook.lua') diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua index 143ca4fe7a..5fece5bbea 100644 --- a/player/lua/ytdl_hook.lua +++ b/player/lua/ytdl_hook.lua @@ -120,7 +120,11 @@ mp.add_hook("on_load", 10, function () -- DASH? if not (json["requested_formats"] == nil) then - msg.info("NOTE: Using DASH, expect inaccurate duration.") + msg.info("Using DASH, expect inaccurate duration.") + if not (json.duration == nil) then + msg.info("actual duration: " .. mp.format_time(json.duration)) + end + -- video url streamurl = json["requested_formats"][1].url -- cgit v1.2.3