From c5832589ba6dbad7ff4b250cbe4a6f85d540355d Mon Sep 17 00:00:00 2001 From: Toni Gundogdu Date: Mon, 29 Apr 2013 11:06:32 +0300 Subject: [PATCH] FIX: website/spiegel.lua: choose_default Choosing to use the "lowest quality" stream (3gp) as the 'default' stream would cause HTTP/404 when the stream was accessed. Although this stream is listed among those available ones, it appears to be missing for most videos (if not all). Spiegel.choose_default: Return the first available stream as the new 'default' stream. Signed-off-by: Toni Gundogdu --- share/lua/website/spiegel.lua | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/share/lua/website/spiegel.lua b/share/lua/website/spiegel.lua index 2e7de1a..f6462b2 100644 --- a/share/lua/website/spiegel.lua +++ b/share/lua/website/spiegel.lua @@ -131,15 +131,8 @@ function Spiegel.choose_best(formats) -- Highest quality available return r end -function Spiegel.choose_default(formats) -- Lowest quality available - local r = {width=0xffff, height=0xffff, bitrate=0xffff, url=nil} - local U = require 'quvi/util' - for _,v in pairs(formats) do - if U.is_lower_quality(v,r) then - r = v - end - end - return r +function Spiegel.choose_default(formats) + return formats[1] end function Spiegel.to_s(t) -- 2.11.4.GIT