From 41a75166476d915950096e3e88c03f44f0cba965 Mon Sep 17 00:00:00 2001 From: Toni Gundogdu Date: Tue, 20 Aug 2013 10:29:12 +0300 Subject: [PATCH] FIX: media/funnyordie.lua: Stream URL pattern Update the media stream URL pattern to reflect the recent changes to the website. Look for the video/mp4 content only. Signed-off-by: Toni Gundogdu --- share/media/funnyordie.lua | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/share/media/funnyordie.lua b/share/media/funnyordie.lua index d50eb7c..be2d783 100644 --- a/share/media/funnyordie.lua +++ b/share/media/funnyordie.lua @@ -61,12 +61,10 @@ end function FunnyOrDie.iter_streams(p) local t = {} - for u in p:gmatch('source src="(.-)"') do table.insert(t,u) end - -- There should be at least two stream URLs at this point. - -- first: the (playlist) URL for the segmented videos (unusable to us) - -- ...: the media stream URLs - if #t <2 then error('no match: media stream URL') end - table.remove(t,1) -- Remove the first stream URL. + for u in p:gmatch('type: "video/mp4", src: "(.-)"') do + table.insert(t, u) + end + if #t ==0 then error('no match: media stream URL') end local S = require 'quvi/stream' local r = {} -- 2.11.4.GIT