From 000b6b2306b7d5e8a2229bf1126226ae25193305 Mon Sep 17 00:00:00 2001 From: Toni Gundogdu Date: Thu, 17 Jan 2013 15:27:25 +0200 Subject: [PATCH] subtitle/ Use updated quvi.fetch quvi.fetch will now return a table, modify the subtitle scripts accordingly. Signed-off-by: Toni Gundogdu --- share/subtitle/export/subrip.lua | 2 +- share/subtitle/youtube.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/share/subtitle/export/subrip.lua b/share/subtitle/export/subrip.lua index 2338b3a..08ad9de 100644 --- a/share/subtitle/export/subrip.lua +++ b/share/subtitle/export/subrip.lua @@ -58,7 +58,7 @@ function SubRip.from_tt(qargs) local U = require 'quvi/util' local L = require 'lxp.lom' - local x = quvi.fetch(qargs.input_url) + local x = quvi.fetch(qargs.input_url).data local t = L.parse(x) local r = {} diff --git a/share/subtitle/youtube.lua b/share/subtitle/youtube.lua index 4fab67c..c71ae07 100644 --- a/share/subtitle/youtube.lua +++ b/share/subtitle/youtube.lua @@ -50,7 +50,7 @@ end -- Extract the TTS (text-to-speech, or transcript). function YouTube.tts_get(qargs, v, u, C) local u_fmt = "%s&tlang=%s&type=trackformat=1,&lang=en&kind=asr" - local p = quvi.fetch(u) + local p = quvi.fetch(u).data local tts_url = p:match('[\'"]TTS_URL[\'"]:%s+[\'"](.-)[\'"]') if not tts_url then return end @@ -85,7 +85,7 @@ function YouTube.cc_get(qargs, v, C) "http://youtube.com/api/timedtext?hl=en&type=track&v=%s&name=%s&lang=%s" local u = 'http://video.google.com/timedtext?hl=en&type=list&v=' ..v - local x = quvi.fetch(u) + local x = quvi.fetch(u).data local L = require 'lxp.lom' local t = L.parse(x) local r = {} -- 2.11.4.GIT