adapt youtube parser; fixes cclive

This commit is contained in:
sthen 2012-09-27 23:46:16 +00:00
parent 88ddd9917b
commit e435381750
2 changed files with 21 additions and 2 deletions

View File

@ -1,11 +1,11 @@
# $OpenBSD: Makefile,v 1.4 2012/09/19 08:15:09 jasper Exp $
# $OpenBSD: Makefile,v 1.5 2012/09/27 23:46:16 sthen Exp $
PKG_ARCH = *
COMMENT= scripts libquvi uses for parsing the media details
DISTNAME= libquvi-scripts-0.4.1
REVISION= 1
REVISION= 2
MODULES= lang/lua

View File

@ -0,0 +1,19 @@
$OpenBSD: patch-share_lua_website_youtube_lua,v 1.1 2012/09/27 23:46:16 sthen Exp $
http://sourceforge.net/mailarchive/message.php?msg_id=29892252
--- share/lua/website/youtube.lua.orig Fri Sep 28 00:43:26 2012
+++ share/lua/website/youtube.lua Fri Sep 28 00:43:59 2012
@@ -125,7 +125,11 @@ function YouTube.iter_formats(config, U)
for f in fmt_stream_map:gfind('([^,]*),') do
local d = U.decode(f)
if d['itag'] and d['url'] then
- urls[U.unescape(d['itag'])] = U.unescape(d['url'])
+ local uurl = U.unescape(d['url'])
+ if d['sig'] then
+ uurl = uurl .. "&signature=" .. U.unescape(d['sig'])
+ end
+ urls[U.unescape(d['itag'])] = uurl
end
end