[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#686514: marked as done (unblock: libquvi-scripts/0.4.8-2)



Your message dated Sun, 02 Sep 2012 21:25:05 +0100
with message-id <1346617505.9978.1.camel@jacala.jungle.funky-badger.org>
and subject line Re: Bug#686514: unblock: libquvi-scripts/0.4.8-2
has caused the Debian Bug report #686514,
regarding unblock: libquvi-scripts/0.4.8-2
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
686514: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=686514
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
User: release.debian.org@packages.debian.org
Usertags: unblock

I would like to include the version of libquvi-scripts currently in
experimental in wheezy. It includes various fixes to continue being
able to scrap information from video sites.

There are however a few changes in addition to that:

bloomberg.lua is disabled as it currently does not work.

The default video format for YouTube changes to the first 480p format
returned or the first format returned. I think this is a better default
than the lowest quality video used earlier.

Also support for new websites was added (bbc.lua, lego.lua,
justintv.lua). These are not important to get into wheezy, but as they
are isolated this should not break other parts.

The debdiff looks a bit large:

 89 files changed, 994 insertions(+), 163 deletions(-)

After cleaning the diff of version changes, ChangeLog updates, and
autotools noise it gets a bit smaller:

 28 files changed, 580 insertions(+), 80 deletions(-)

The largest part of these changes comes from the newly supported sites:

 share/lua/website/bbc.lua                        |  241
 share/lua/website/justintv.lua                   |   73
 share/lua/website/lego.lua                       |   60

Ansgar
diff -Nru libquvi-scripts-0.4.6/NEWS libquvi-scripts-0.4.8/NEWS
--- libquvi-scripts-0.4.6/NEWS	2012-06-10 12:36:54.000000000 +0200
+++ libquvi-scripts-0.4.8/NEWS	2012-08-21 09:54:54.000000000 +0200
@@ -1,3 +1,49 @@
+v0.4.8  (2012-08-21) / Toni Gundogdu
+
+anon:
+  - totallynsfw.lua: Handle embedded media hosted elsewhere [e5a0d97]
+Bastien Nocera:
+  - FIX: 101greatgoals.lua: article pattern [e4ae322]
+  - souncloud.lua: Never offer placeholder as thumbnail [2ffd344]
+  and Pierre Carrier:
+  - Add support for BBC iPlayer (#28) [282632e]
+Ross Burton:
+  - Add website/lego.lua (#107) [c38aa05]
+Toni Gundogdu:
+  - FIX: dailymotion.lua: sequence pattern (#108) [41e4bd9]
+  - FIX: media/gaskrank.lua: Media ID, stream URL patterns [186b41e]
+  - FIXME: website/bloomberg.lua [48ca011]
+
+ 13 files changed, 402 insertions(+), 37 deletions(-)
+
+
+v0.4.7  (2012-07-18) / Toni Gundogdu
+
+Adam Sampson:
+  - dailymotion.lua: Make urlback pattern more liberal [8eded85]
+brunorex:
+  - Add support for justin.tv and twitch.tv (#99) [86baf5d]
+Mikhail Gusarov:
+  - tvrain.lua: Adjust for new URL scheme on the site [7bf1682]
+Till Maas:
+  - Support spiegel.de with SEO URLs [6afe8e9]
+Toni Gundogdu:
+  - FIX: gaskrank.lua: stream URL, ID patterns [78817b8]
+  - FIX: gaskrank.lua: title pattern [52c6f6d]
+  - FIX: tvrain.lua: Change how media ID is parsed [7dfbc1e]
+  - FIX: vimeo.lua:115: no match: qualities (#106) [d7182ac]
+  - youtube.lua: Rewrite YouTube.choose_default [aec0afa]
+
+      Change how youtube.lua chooses the 'default' format for
+      YouTube media URLs:
+        - Either whichever is of 480p is found first
+        - Or whatever YouTube returns as the first format
+
+      The script previously defaulted to the lowest quality.
+
+ 15 files changed, 118 insertions(+), 44 deletions(-)
+
+
 v0.4.6 (2012-06-10) / Toni Gundogdu
 
 Mikhail Gusarov:
diff -Nru libquvi-scripts-0.4.6/debian/changelog libquvi-scripts-0.4.8/debian/changelog
--- libquvi-scripts-0.4.6/debian/changelog	2012-06-28 09:44:40.000000000 +0200
+++ libquvi-scripts-0.4.8/debian/changelog	2012-08-25 08:53:25.000000000 +0200
@@ -1,3 +1,15 @@
+libquvi-scripts (0.4.8-1) experimental; urgency=low
+
+  * New upstream release.
+
+ -- Ansgar Burchardt <ansgar@debian.org>  Sat, 25 Aug 2012 08:38:41 +0200
+
+libquvi-scripts (0.4.7-1) experimental; urgency=low
+
+  * New upstream release.
+
+ -- Ansgar Burchardt <ansgar@debian.org>  Tue, 31 Jul 2012 19:52:12 +0200
+
 libquvi-scripts (0.4.6-1) unstable; urgency=low
 
   * New upstream release.
diff -Nru libquvi-scripts-0.4.6/debian/copyright libquvi-scripts-0.4.8/debian/copyright
--- libquvi-scripts-0.4.6/debian/copyright	2012-06-28 09:43:32.000000000 +0200
+++ libquvi-scripts-0.4.8/debian/copyright	2012-08-25 08:53:24.000000000 +0200
@@ -45,6 +45,10 @@
 Copyright: 2012, Mikhail Gusarov <dottedmag@dottedmag.net>
 License: LGPL-2.1+
 
+Files: share/lua/website/lego.lua
+Copyright: 2012, Ross Burton <ross@burtonini.com>
+License: LGPL-2.1+
+
 Files: debian/*
 Copyright: 2011 Alejandro Garrido Mota <garridomota@gmail.com>
 License: GPL-3+
diff -Nru libquvi-scripts-0.4.6/share/Makefile.am libquvi-scripts-0.4.8/share/Makefile.am
--- libquvi-scripts-0.4.6/share/Makefile.am	2012-06-10 12:28:21.000000000 +0200
+++ libquvi-scripts-0.4.8/share/Makefile.am	2012-08-21 09:46:36.000000000 +0200
@@ -16,7 +16,7 @@
  lua/website/academicearth.lua \
  lua/website/arte.lua \
  lua/website/audioboo.lua \
- lua/website/bloomberg.lua \
+ lua/website/bbc.lua \
  lua/website/break.lua \
  lua/website/canalplus.lua \
  lua/website/cbsnews.lua \
@@ -30,6 +30,8 @@
  lua/website/golem.lua \
  lua/website/guardian.lua \
  lua/website/imdb.lua \
+ lua/website/justintv.lua \
+ lua/website/lego.lua \
  lua/website/liveleak.lua \
  lua/website/mgnetwork.lua \
  lua/website/metacafe.lua \
@@ -69,6 +71,7 @@
 DIST_lua+=\
  lua/website/bikeradar.lua \
  lua/website/blip.lua \
+ lua/website/bloomberg.lua \
  lua/website/francetelevisions.lua \
  lua/website/globo.lua \
  lua/website/pluzz.lua
diff -Nru libquvi-scripts-0.4.6/share/lua/website/101greatgoals.lua libquvi-scripts-0.4.8/share/lua/website/101greatgoals.lua
--- libquvi-scripts-0.4.6/share/lua/website/101greatgoals.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/101greatgoals.lua	2012-08-21 09:56:45.000000000 +0200
@@ -55,8 +55,9 @@
 function HaOgg.check_external_content(self)
     local p = quvi.fetch(self.page_url)
 
-    local a = p:match('<div id="space4para" class="post%-type%-gvideos">(.-)</div>')
-                or error("no match: article")
+    local m = '<div .- id="space4para" class="post%-type%-gvideos">'
+              ..'.-<script (.-)</script>'
+    local a = p:match(m) or error("no match: article")
 
     -- Self-hosted, and they use YouTube
     -- http://www.101greatgoals.com/gvideos/golazo-wanchope-abila-sarmiento-junin-v-merlo-2/
diff -Nru libquvi-scripts-0.4.6/share/lua/website/bbc.lua libquvi-scripts-0.4.8/share/lua/website/bbc.lua
--- libquvi-scripts-0.4.6/share/lua/website/bbc.lua	1970-01-01 01:00:00.000000000 +0100
+++ libquvi-scripts-0.4.8/share/lua/website/bbc.lua	2012-08-21 09:56:45.000000000 +0200
@@ -0,0 +1,241 @@
+
+-- quvi
+-- Copyright (C) 2011, 2012  quvi project
+--
+-- This file is part of quvi <http://quvi.sourceforge.net/>.
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License, or (at your option) any later version.
+--
+-- This library is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+-- 02110-1301  USA
+
+
+-- TODO:
+-- - Add support for Radio programmes
+-- - Add support for live streaming
+-- - Better error messages for geolocation errors
+-- - Offer the subtitles for download somehow
+
+-- Obtained with grep -oP '(?<=service=")[^"]+(?=")' on config
+local fmt_id_lookup = {
+  high     = 'iplayer_streaming_h264_flv_high',
+  standard = 'iplayer_streaming_h264_flv',
+  low      = 'iplayer_streaming_h264_flv_lo',
+  vlow     = 'iplayer_streaming_h264_flv_vlo'
+  -- iplayer_streaming_n95_3g
+  -- iplayer_streaming_n95_wifi
+}
+
+-- Identify the script.
+function ident(self)
+    package.path = self.script_dir .. '/?.lua'
+    local C      = require 'quvi/const'
+    local r      = {}
+    r.domain     = "www.bbc.co.uk"
+    r.formats    = "default|best"
+    for k,_ in pairs(fmt_id_lookup) do
+        r.formats = r.formats .."|".. k
+    end
+    r.categories = C.proto_rtmp
+    local U      = require 'quvi/util'
+    r.handles    = U.handles(self.page_url, {r.domain}, {"/iplayer/"})
+    return r
+end
+
+-- Parse video URL.
+function parse(self)
+
+    function needs_new_authString(params)
+        if not params['authString'] then
+            return false
+        end
+        local found = false
+        for _,kind in pairs{'limelight', 'akamai', 'level3', 'sis', 'iplayertok'} do
+            if kind == params['kind'] then
+                found = true
+                break
+            end
+        end
+        if not found then return false end
+        -- We don't need to check for the mode, we already know it's what we want
+        return true
+    end
+
+    function create_uri_for_limelight_level3_iplayertok(params)
+        params.uri = params.tcurl .. '/' .. params.playpath
+    end
+
+    function process_akamai(params)
+        params.playpath = params.identifier
+        params.application = params.application or 'ondemand'
+        params.application = params.application .. '?_fcs_vhost=' .. params.server .. '&undefined'
+        params.uri = 'rtmp://' .. params.server .. ':80/' .. params.application
+        if not params.authString:find("&aifp=") then
+            params.authString = params.authString .. '&aifp=v001'
+        end
+        if not params.authString:find("&slist=") then
+            params.identifier = params.identifier:gsub('^mp[34]:', '')
+            params.authString = params.authString .. '&slist=' .. params.identifier
+        end
+        params.playpath = params.playpath .. '?' .. params.authString
+        params.uri = params.uri .. '&' .. params.authString
+        params.application = params.application .. '&' .. params.authString
+        params.tcurl = 'rtmp://' .. params.server .. ':80/' .. params.application
+    end
+
+    function process_limelight_level3(params)
+        params.application = params.application .. '?' .. params.authString
+        params.tcurl = 'rtmp://' .. params.server .. ':1935/' .. params.application
+        params.playpath = params.identifier
+        create_uri_for_limelight_level3_iplayertok(params)
+    end
+
+    function process_iplayertok(params)
+        params.identifier = params.identifier .. '?' .. params.authString
+        params.playpath = params.identifier:gsub('^mp[34]:', '')
+        params.tcurl = 'rtmp://' .. params.server .. ':1935/' .. params.application
+        create_uri_for_limelight_level3_iplayertok(params)
+    end
+
+    self.host_id = 'bbc'
+
+    local _,_,s = self.page_url:find('episode/(.-)/')
+    local episode_id = s or error('no match: episode id')
+    self.id = episode_id
+
+    local playlist_uri =
+        'http://www.bbc.co.uk/iplayer/playlist/' .. episode_id
+    local playlist = quvi.fetch(playlist_uri, {fetch_type = 'playlist'})
+
+    local pl_item_p,_,s = playlist:find('<item kind="programme".-identifier="(.-)"')
+    if not s then
+        pl_item_p,_,s = playlist:find('<item kind="radioProgramme".-identifier="(.-)"')
+        -- TODO: Implement radio support
+        if s then
+            error('No support for radio yet')
+        end
+    end
+    local media_id = s or error('no match: media id')
+
+    local _,_,s = playlist:find('duration="(%d+)"', pl_item_p)
+    self.duration = tonumber(s) or 0
+
+    local _,_,s = playlist:find('<title>(.-)</title>')
+    self.title = s or error('no match: video title')
+
+    local _,_,s = playlist:find('<link rel="holding" href="(.-)"')
+    self.media_thumbnail_url = s or ""
+
+    -- stolen from http://lua-users.org/wiki/MathLibraryTutorial
+    math.randomseed(os.time()) math.random() math.random() math.random()
+    local config_uri =
+        'http://www.bbc.co.uk/mediaselector/4/mtis/stream/' ..
+        media_id .. "?cb=" .. math.random(10000)
+
+    local config = quvi.fetch(config_uri, {fetch_type = 'config'})
+
+    available_formats = {}
+    for fmt_id in config:gmatch("iplayer_streaming_[%w_]+") do
+        available_formats[fmt_id] = true
+    end
+    -- Create the list of acceptable formats, ordered by preference
+    local r = self.requested_format
+    local preferred = ((r == 'best') and {'high', 'standard', 'low', 'vlow'})
+                   or ((r == 'default') and {'standard', 'low', 'vlow', 'high'})
+                   or {r}
+
+    -- Pick the first acceptable format available
+    local format
+    for _, cur_format in ipairs(preferred) do
+        if available_formats[fmt_id_lookup[cur_format]] then
+            format = cur_format
+            break
+        end
+    end
+    if not format then error('format not available') end
+
+    -- Iterate over <media/>s
+    local media
+    for section in config:gmatch('<media .-</media>') do
+        if section:find('service="' .. fmt_id_lookup[format] .. '"') then
+            media = section
+            break
+        end
+    end
+    if not media then error("Couldn't parse the config") end
+
+    self.url = {}
+
+    -- Initialise with the default values from the media
+    local mparams = {}
+    for _,mparam in pairs{'kind', 'service'} do
+        _,_,mparams[mparam] = media:find(mparam .. '="(.-)"')
+        -- print ("MEDIA: mparams[" .. mparam .. "] = " .. mparams[mparam])
+    end
+
+    for connection in media:gmatch('<connection .-/>') do
+        local params, complete_uri = {}, ''
+
+        for _,param in pairs{'supplier', 'server', 'application', 'identifier', 'authString', 'kind'} do
+            _,_,params[param] = connection:find(param .. '="(.-)"')
+            -- print ("CONNECTION: params[" .. param .. "] = " .. (params[param] or "(null)"))
+        end
+
+        -- Get authstring from more specific mediaselector if
+        -- this mode is specified - fails sometimes otherwise
+	if needs_new_authString(params) then
+	    local xml_url
+	    xml_uri =
+	        'http://www.bbc.co.uk/mediaselector/4/mtis/stream/' ..
+		media_id .. '/' .. mparams['service'] .. '/' .. params['kind'] ..
+		"?cb=" .. math.random(10000)
+	    xml = quvi.fetch(xml_uri, {fetch_type = 'config'})
+	    local _,_,new_authString = xml:find('authString="(.-)"')
+	    if new_authString then
+	        params['authString'] = new_authString:gsub('&amp;', '&')
+	    end
+        else
+            -- Unescape the authString
+            if params['authString'] then
+                params['authString'] = params['authString']:gsub('&amp;', '&')
+            end
+        end
+
+        -- in 'application', mp has a value containing one or more entries separated by strings.
+        -- We only keep the first entry.
+        if params.application then
+            params.application = params.application:gsub("&mp=([^,&]+),?.-&", "&mp=%1&")
+        end
+
+        if params.supplier == 'akamai' then
+            process_akamai(params)
+        end
+
+        if (params.supplier == 'limelight' or params.supplier == 'level3') then
+            process_limelight_level3(params)
+        end
+
+        params.uri = params.uri or error('Could not create RTMP URL')
+
+        complete_uri = params.uri
+            .. ' app=' .. params.application
+            .. ' playpath=' .. params.playpath
+            .. ' swfUrl=http://www.bbc.co.uk/emp/revisions/18269_21576_10player.swf?revision=18269_21576 swfVfy=1'
+            .. ' tcUrl=' .. params.tcurl
+            .. ' pageurl=' .. self.page_url
+
+        self.url[#(self.url) + 1] = complete_uri
+    end
+
+    return self
+end
diff -Nru libquvi-scripts-0.4.6/share/lua/website/dailymotion.lua libquvi-scripts-0.4.8/share/lua/website/dailymotion.lua
--- libquvi-scripts-0.4.6/share/lua/website/dailymotion.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/dailymotion.lua	2012-08-21 09:56:45.000000000 +0200
@@ -88,7 +88,7 @@
 function Dailymotion.fetch_page(self, U)
     self.page_url = Dailymotion.normalize(self.page_url)
 
-    local s = self.page_url:match('/family_filter%?urlback=(.+)')
+    local s = self.page_url:match('[%?%&]urlback=(.+)')
     if s then
         self.page_url = 'http://dailymotion.com' .. U.unescape(s)
     end
@@ -107,7 +107,8 @@
 end
 
 function Dailymotion.iter_formats(page, U)
-    local seq = page:match('"sequence",%s+"(.-)"')
+    local seq = page:match('"sequence":"(.-)"')
+                  or error('no match: sequence')
     if not seq then
         local e = "no match: sequence"
         if page:match("_partnerplayer") then
diff -Nru libquvi-scripts-0.4.6/share/lua/website/gaskrank.lua libquvi-scripts-0.4.8/share/lua/website/gaskrank.lua
--- libquvi-scripts-0.4.6/share/lua/website/gaskrank.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/gaskrank.lua	2012-08-21 09:56:45.000000000 +0200
@@ -45,14 +45,14 @@
 
     local p = quvi.fetch(self.page_url)
 
-    self.title = p:match('name="description" content="(.-)"')
-                  or error("no match: media title")
+    self.title = p:match('"og:title" content="(.-)"')
+                  or error('no match: media title')
 
-    self.id = p:match('unit_long(.-)"')
-                or error("no match: media id")
+    local u = p:match("(http://movies.-%.flv)")
+                or error("no match: media stream URL")
 
-    self.url = {p:match('file=(.-)"')
-                or error ("no match: media url")}
+    self.id = u:match("/%d+/(%d+)%.%w+") or error("no match: media ID")
+    self.url = {u}
 
     return self
 end
diff -Nru libquvi-scripts-0.4.6/share/lua/website/justintv.lua libquvi-scripts-0.4.8/share/lua/website/justintv.lua
--- libquvi-scripts-0.4.6/share/lua/website/justintv.lua	1970-01-01 01:00:00.000000000 +0100
+++ libquvi-scripts-0.4.8/share/lua/website/justintv.lua	2012-08-21 09:56:45.000000000 +0200
@@ -0,0 +1,73 @@
+
+-- libquvi-scripts v0.4.8
+-- Copyright (C) 2012  quvi project <http://quvi.sourceforge.net/>
+--
+-- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License, or (at your option) any later version.
+--
+-- This library is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+-- 02110-1301  USA
+--
+
+-- Identify the script.
+function ident(self)
+    package.path  = self.script_dir .. '/?.lua'
+    local C       = require 'quvi/const'
+    local r       = {}
+    local domains = {"twitch%.tv", "justin%.tv"}
+    r.domain      = table.concat(domains, "|")
+    r.formats     = "default"
+    r.categories  = C.proto_http
+    local U       = require 'quvi/util'
+    r.handles     = U.handles(self.page_url, domains, {"/[%w_]+/b/%d+"})
+    return r
+end
+
+-- Query available formats.
+function query_formats(self)
+    self.formats = 'default'
+    return self
+end
+
+-- Parse media URL.
+function parse(self)
+    self.host_id = "justintv"
+
+    self.id = self.page_url:match("/[%w_]+/b/(%d+)")
+                or error("no match: media ID")
+
+    local c_url = "http://api.justin.tv/api/clip/show/";
+                    .. self.id .. ".xml"
+
+    local c = quvi.fetch(c_url, {fetch_type = 'config'})
+
+    self.title = c:match('<title>(.-)</title>') or ''
+
+    if #self.title ==0 then
+        c = c:gsub("^%s*(.-)%s*$", "%1") -- 'c' may hold an error message.
+        c = c:gsub("%s%s+", " ")         -- Sanitize.
+        error(string.format("no match: media title (%s)",
+                            (#c >0) and c or ''))
+    end
+
+    self.thumbnail_url =
+      c:match('<image_url_medium>(.-)</image_url_medium>') or ''
+
+    self.url = {c:match("<video_file_url>(.-)</video_file_url>")
+                  or error("no match: media URL")}
+
+    return self
+end
+
+-- vim: set ts=4 sw=4 tw=72 expandtab:
diff -Nru libquvi-scripts-0.4.6/share/lua/website/lego.lua libquvi-scripts-0.4.8/share/lua/website/lego.lua
--- libquvi-scripts-0.4.6/share/lua/website/lego.lua	1970-01-01 01:00:00.000000000 +0100
+++ libquvi-scripts-0.4.8/share/lua/website/lego.lua	2012-08-21 09:56:45.000000000 +0200
@@ -0,0 +1,60 @@
+
+-- libquvi-scripts v0.4.8
+-- Copyright (C) 2012  Ross Burton <ross@burtonini.com>
+--
+-- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License, or (at your option) any later version.
+--
+-- This library is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+-- 02110-1301  USA
+--
+
+-- Identify the script.
+function ident(self)
+    package.path = self.script_dir .. '/?.lua'
+    local C      = require 'quvi/const'
+    local r      = {}
+    r.domain     = "city%.lego%.com"
+    r.formats    = "default"
+    r.categories = C.proto_http
+    local U      = require 'quvi/util'
+    r.handles    = U.handles(self.page_url, {r.domain}, {"/.+/Movies/.+$"})
+    return r
+end
+
+-- Query available formats.
+function query_formats(self)
+    self.formats  = "default"
+    return self
+end
+
+-- Parse video URL.
+function parse(self)
+    self.host_id = "lego"
+    local p = quvi.fetch(self.page_url)
+
+    local s = p:match('<trackingName>(.+)</trackingName>')
+              or error("no match: tracking name")
+    local index = s:find("-")
+
+    self.title = s:sub(0, index-1)
+    self.id = s:sub(index+1)
+
+    -- TODO self.thumbnail_url
+
+    self.url = {p:match('<movie>(.+)</movie>')
+               or error("no match: media stream URL")}
+
+    return self
+end
diff -Nru libquvi-scripts-0.4.6/share/lua/website/soundcloud.lua libquvi-scripts-0.4.8/share/lua/website/soundcloud.lua
--- libquvi-scripts-0.4.6/share/lua/website/soundcloud.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/soundcloud.lua	2012-08-21 09:56:45.000000000 +0200
@@ -58,7 +58,9 @@
         if p == 'og:title' then
             self.title = c
         elseif p == 'og:image' then
-            self.thumbnail_url = c
+            if not c:find('placeholder%.png') then
+                self.thumbnail_url = c
+            end
         end
     end
 
diff -Nru libquvi-scripts-0.4.6/share/lua/website/spiegel.lua libquvi-scripts-0.4.8/share/lua/website/spiegel.lua
--- libquvi-scripts-0.4.6/share/lua/website/spiegel.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/spiegel.lua	2012-08-21 09:56:45.000000000 +0200
@@ -88,7 +88,7 @@
 --
 
 function Spiegel.get_media_id(self)
-    self.id = self.page_url:match("/video/video%-(.-)%.")
+    self.id = self.page_url:match("/video/.-video%-(.-)%.")
                 or error ("no match: media id")
 end
 
diff -Nru libquvi-scripts-0.4.6/share/lua/website/totallynsfw.lua libquvi-scripts-0.4.8/share/lua/website/totallynsfw.lua
--- libquvi-scripts-0.4.6/share/lua/website/totallynsfw.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/totallynsfw.lua	2012-08-21 09:56:45.000000000 +0200
@@ -20,6 +20,8 @@
 -- 02110-1301  USA
 --
 
+local TotallyNSFW = {} -- Utility functions specific to this script
+
 -- Identify the script.
 function ident(self)
     package.path = self.script_dir .. '/?.lua'
@@ -29,12 +31,25 @@
     r.formats    = "default"
     r.categories = C.proto_http
     local U      = require 'quvi/util'
-    r.handles    = U.handles(self.page_url, {r.domain}, {"/videos/.-"})
+    local is_rss = U.handles(self.page_url, {r.domain},
+                            {"/videos/rss_2%.0/?"})
+    if is_rss then -- Don't try to handle the RSS feeds
+        r.handles = false
+    else
+        r.handles = U.handles(self.page_url, {r.domain},
+                              {"/videos/.-", "/nsfw/"})
+    end
     return r
 end
 
 -- Query available formats.
 function query_formats(self)
+    local p = quvi.fetch(self.page_url)
+
+    if TotallyNSFW.is_external(self, p) then
+        return self
+    end
+
     self.formats = 'default'
     return self
 end
@@ -45,6 +60,10 @@
 
     local p = quvi.fetch(self.page_url)
 
+    if TotallyNSFW.is_external(self, p) then
+        return self
+    end
+
     self.title = p:match('<div class="hdr"><h2>(.-)</h2></div>')
                   or error ("no match: media title")
 
@@ -64,4 +83,27 @@
     return self
 end
 
+--
+-- Utility functions.
+--
+
+function TotallyNSFW.is_external(self, page)
+    local u = page:match('options=(.-)"')
+    if u then
+        if TotallyNSFW.is_hosted_at_pornhub(self, u) then
+            return true
+        end
+        -- Add more below if necessary.
+    end
+    return false
+end
+
+function TotallyNSFW.is_hosted_at_pornhub(self, url)
+    if url:match('pornhub%.com/embed_player') then
+        local c = quvi.fetch(url, {fetch_type='config'})
+        self.redirect_url = c:match('<link_url>(.-)<') or ''
+    end
+    return #self.redirect_url >0
+end
+
 -- vim: set ts=4 sw=4 tw=72 expandtab:
diff -Nru libquvi-scripts-0.4.6/share/lua/website/tvrain.lua libquvi-scripts-0.4.8/share/lua/website/tvrain.lua
--- libquvi-scripts-0.4.6/share/lua/website/tvrain.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/tvrain.lua	2012-08-21 09:56:45.000000000 +0200
@@ -29,7 +29,7 @@
     r.formats    = "default"
     r.categories = C.proto_http
     local U      = require 'quvi/util'
-    r.handles    = U.handles(self.page_url, {r.domain}, {"/teleshow/"})
+    r.handles    = U.handles(self.page_url, {r.domain}, {"/articles/"})
     return r
 end
 
@@ -43,6 +43,9 @@
 function parse(self)
     self.host_id = "tvrain"
 
+    self.id = self.page_url:match('%-(%d+)/$')
+                or error("no match: media ID")
+
     local p = quvi.fetch(self.page_url)
 
     -- tvrain uses <iframe> for the video player which constructs URL to load a
@@ -61,9 +64,6 @@
 
     local pl = quvi.fetch(u, {fetch_type='playlist'})
 
-    self.id = pl:match('<programm[^>]-id="(.-)"')
-                or error("no match: media ID")
-
     self.title = pl:match('<video[^>]-name="(.-)"')
                   or error("no match: media title")
 
diff -Nru libquvi-scripts-0.4.6/share/lua/website/vimeo.lua libquvi-scripts-0.4.8/share/lua/website/vimeo.lua
--- libquvi-scripts-0.4.6/share/lua/website/vimeo.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/vimeo.lua	2012-08-21 09:56:45.000000000 +0200
@@ -98,7 +98,7 @@
     self.id = self.page_url:match('vimeo.com/(%d+)')
                 or error("no match: media ID")
 
-    local c_url = "http://player.vimeo.com/config/"; .. self.id
+    local c_url = "http://vimeo.com/"; .. self.id
     local c = quvi.fetch(c_url, {fetch_type='config'})
 
     if c:match('<error>') then
diff -Nru libquvi-scripts-0.4.6/share/lua/website/youtube.lua libquvi-scripts-0.4.8/share/lua/website/youtube.lua
--- libquvi-scripts-0.4.6/share/lua/website/youtube.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/youtube.lua	2012-08-21 09:56:45.000000000 +0200
@@ -192,15 +192,14 @@
     return r
 end
 
-function YouTube.choose_default(formats) -- Lowest quality available
-    local r = {width=0xffff, height=0xffff, url=nil}
-    local U = require 'quvi/util'
+function YouTube.choose_default(formats)
+    local r = formats[1] -- Either whatever YouTube returns as the first.
     for _,v in pairs(formats) do
-        if U.is_lower_quality(v,r) then
+        if v.height == 480 then -- Or, whichever is of 480p and found first.
             r = v
+            break
         end
     end
---    for k,v in pairs(r) do print(k,v) end
     return r
 end
 
diff -Nru libquvi-scripts-0.4.6/tests/data/format/default/bloomberg.json libquvi-scripts-0.4.8/tests/data/format/default/bloomberg.json
--- libquvi-scripts-0.4.6/tests/data/format/default/bloomberg.json	2012-05-27 13:40:53.000000000 +0200
+++ libquvi-scripts-0.4.8/tests/data/format/default/bloomberg.json	1970-01-01 01:00:00.000000000 +0100
@@ -1,16 +0,0 @@
-{
-  "host": "bloomberg",
-  "page_title": "Bloomberg Game Changers: Steve Jobs",
-  "page_url": "http://www.bloomberg.com/video/63722844/";,
-  "id": "66626118",
-  "format_requested": "default",
-  "link": [
-    {
-      "id": "1",
-      "length_bytes": "203586089",
-      "content_type": "video/x-flv",
-      "file_suffix": "flv",
-      "url": ""
-    }
-  ]
-}
diff -Nru libquvi-scripts-0.4.6/tests/data/format/default/fixme/bloomberg.json libquvi-scripts-0.4.8/tests/data/format/default/fixme/bloomberg.json
--- libquvi-scripts-0.4.6/tests/data/format/default/fixme/bloomberg.json	1970-01-01 01:00:00.000000000 +0100
+++ libquvi-scripts-0.4.8/tests/data/format/default/fixme/bloomberg.json	2012-08-21 09:46:36.000000000 +0200
@@ -0,0 +1,16 @@
+{
+  "host": "bloomberg",
+  "page_title": "Bloomberg Game Changers: Steve Jobs",
+  "page_url": "http://www.bloomberg.com/video/63722844/";,
+  "id": "66626118",
+  "format_requested": "default",
+  "link": [
+    {
+      "id": "1",
+      "length_bytes": "203586089",
+      "content_type": "video/x-flv",
+      "file_suffix": "flv",
+      "url": ""
+    }
+  ]
+}
diff -Nru libquvi-scripts-0.4.6/tests/data/format/default/gaskrank.json libquvi-scripts-0.4.8/tests/data/format/default/gaskrank.json
--- libquvi-scripts-0.4.6/tests/data/format/default/gaskrank.json	2012-05-27 13:40:53.000000000 +0200
+++ libquvi-scripts-0.4.8/tests/data/format/default/gaskrank.json	2012-08-21 09:34:12.000000000 +0200
@@ -1,6 +1,6 @@
 {
   "host": "gaskrank",
-  "page_title": "1 Runde - Oschersleben 14.08.2008 /Aprilia RSV 250 /Honda RVF 400 R",
+  "page_title": "1 Runde - Oschersleben Aprilia RSV 250 vs Honda RVF 400 R",
   "page_url": "http://www.gaskrank.tv/tv/rennstrecken/1-runde-oschersleben-14082008--6985.htm";,
   "id": "6985",
   "format_requested": "default",
diff -Nru libquvi-scripts-0.4.6/tests/data/format/default/justintv.json libquvi-scripts-0.4.8/tests/data/format/default/justintv.json
--- libquvi-scripts-0.4.6/tests/data/format/default/justintv.json	1970-01-01 01:00:00.000000000 +0100
+++ libquvi-scripts-0.4.8/tests/data/format/default/justintv.json	2012-08-21 09:34:12.000000000 +0200
@@ -0,0 +1,17 @@
+{
+  "host": "justintv",
+  "page_title": "TSM Dyrus 2200+ Smurf NA",
+  "page_url": "http://www.twitch.tv/tsm_dyrus/b/325011119";,
+  "id": "325011119",
+  "format_requested": "default",
+  "thumbnail_url": "http://static-cdn.jtvnw.net/jtv.thumbs/archive-325011119-150x113.jpg";,
+  "link": [
+    {
+      "id": "1",
+      "length_bytes": "967914356",
+      "content_type": "video/x-flv",
+      "file_suffix": "flv",
+      "url": ""
+    }
+  ]
+}
diff -Nru libquvi-scripts-0.4.6/tests/data/format/default/lego.json libquvi-scripts-0.4.8/tests/data/format/default/lego.json
--- libquvi-scripts-0.4.6/tests/data/format/default/lego.json	1970-01-01 01:00:00.000000000 +0100
+++ libquvi-scripts-0.4.8/tests/data/format/default/lego.json	2012-08-21 09:46:36.000000000 +0200
@@ -0,0 +1,16 @@
+{
+  "host": "lego",
+  "page_title": "Gold Run",
+  "page_url": "http://city.lego.com/en-gb/Movies/Gold%20Run.aspx";,
+  "id": "431026",
+  "format_requested": "default",
+  "link": [
+    {
+      "id": "1",
+      "length_bytes": "20933533",
+      "content_type": "application/octet-stream",
+      "file_suffix": "flv",
+      "url": ""
+    }
+  ]
+}
diff -Nru libquvi-scripts-0.4.6/tests/data/format/default/nsfw/redtube.json libquvi-scripts-0.4.8/tests/data/format/default/nsfw/redtube.json
--- libquvi-scripts-0.4.6/tests/data/format/default/nsfw/redtube.json	2012-06-08 12:23:01.000000000 +0200
+++ libquvi-scripts-0.4.8/tests/data/format/default/nsfw/redtube.json	2012-08-21 09:34:12.000000000 +0200
@@ -1,14 +1,14 @@
 {
   "host": "redtube",
-  "page_title": "Cindy Hope and Erik Everhard",
-  "page_url": "http://embed.redtube.com/player/?id=175705&style=redtube";,
-  "id": "175705",
+  "page_title": "Toni Ribas de Crucero 1",
+  "page_url": "http://www.redtube.com/179914";,
+  "id": "179914",
   "format_requested": "default",
-  "thumbnail_url": "http://img03.redtubefiles.com/_thumbs/0000175/0175705/0175705_014i.jpg";,
+  "thumbnail_url": "http://img01.redtubefiles.com/_thumbs/0000179/0179914/0179914_003i.jpg";,
   "link": [
     {
       "id": "1",
-      "length_bytes": "96253934",
+      "length_bytes": "220142123",
       "content_type": "application/octet-stream",
       "file_suffix": "flv",
       "url": ""
diff -Nru libquvi-scripts-0.4.6/tests/data/format/default/soundcloud-2.json libquvi-scripts-0.4.8/tests/data/format/default/soundcloud-2.json
--- libquvi-scripts-0.4.6/tests/data/format/default/soundcloud-2.json	2012-05-27 13:40:53.000000000 +0200
+++ libquvi-scripts-0.4.8/tests/data/format/default/soundcloud-2.json	2012-08-21 09:46:36.000000000 +0200
@@ -1,15 +1,15 @@
 {
   "host": "soundcloud",
-  "page_title": "DOROTHY LITTLE HAPPY - デモサヨナラ (DJ AMAYA VS. GROOVEBOT REMIX)",
-  "page_url": "http://soundcloud.com/dj-amaya/dorothy-little-happy-dj-amaya";,
-  "id": "6YKwEK5p4uaV",
+  "page_title": "小野恵令奈 - えれぴょん (DJ AMAYA VS. GROOVEBOT REMIX)",
+  "page_url": "http://soundcloud.com/dj-amaya/erepyon-dj-amaya-vs-groovebot-remix";,
+  "id": "x881nzdjEGqx",
   "format_requested": "default",
-  "thumbnail_url": "http://i1.sndcdn.com/artworks-000014987582-3c8xy9-t300x300.jpg?77cede1";,
-  "duration": "395303",
+  "thumbnail_url": "http://i1.sndcdn.com/artworks-000028569263-xvpb1c-t300x300.jpg?4b4189b";,
+  "duration": "343928",
   "link": [
     {
       "id": "1",
-      "length_bytes": "6322467",
+      "length_bytes": "5500759",
       "content_type": "audio/mpeg",
       "file_suffix": "mp3",
       "url": ""
diff -Nru libquvi-scripts-0.4.6/tests/data/format/default/tvrain.json libquvi-scripts-0.4.8/tests/data/format/default/tvrain.json
--- libquvi-scripts-0.4.6/tests/data/format/default/tvrain.json	2012-06-10 12:28:21.000000000 +0200
+++ libquvi-scripts-0.4.8/tests/data/format/default/tvrain.json	1970-01-01 01:00:00.000000000 +0100
@@ -1,17 +0,0 @@
-{
-  "host": "tvrain",
-  "page_title": "Парфенов и Познер от 27 мая. Полная версия. Часть 3",
-  "page_url": "http://tvrain.ru/teleshow/parfenov_i_pozner/parfenov_i_pozner_ot_27_maya_polnaya_versiya_chast_3-271745/";,
-  "id": "5214",
-  "format_requested": "default",
-  "thumbnail_url": "http://photo.tvigle.ru/res/prt/c330f15b00e2d7499a04688ae5657e5d/44/83/000001814483/pub_midle.jpg";,
-  "link": [
-    {
-      "id": "1",
-      "length_bytes": "126304168",
-      "content_type": "video/x-flv",
-      "file_suffix": "flv",
-      "url": ""
-    }
-  ]
-}
diff -Nru libquvi-scripts-0.4.6/tests/data/format/default/videa.json libquvi-scripts-0.4.8/tests/data/format/default/videa.json
--- libquvi-scripts-0.4.6/tests/data/format/default/videa.json	2012-05-27 13:40:53.000000000 +0200
+++ libquvi-scripts-0.4.8/tests/data/format/default/videa.json	2012-08-21 09:34:12.000000000 +0200
@@ -9,8 +9,8 @@
     {
       "id": "1",
       "length_bytes": "3388872",
-      "content_type": "video/x-flv",
-      "file_suffix": "flv",
+      "content_type": "video/mp4",
+      "file_suffix": "mp4",
       "url": ""
     }
   ]
diff -Nru libquvi-scripts-0.4.6/tests/data/format/default/vimeo.json libquvi-scripts-0.4.8/tests/data/format/default/vimeo.json
--- libquvi-scripts-0.4.6/tests/data/format/default/vimeo.json	2012-06-08 12:23:01.000000000 +0200
+++ libquvi-scripts-0.4.8/tests/data/format/default/vimeo.json	2012-08-21 09:46:36.000000000 +0200
@@ -4,12 +4,12 @@
   "page_url": "http://vimeo.com/42605731";,
   "id": "42605731",
   "format_requested": "default",
-  "thumbnail_url": "http://b.vimeocdn.com/ts/295/718/295718677_640.jpg";,
-  "duration": "228000",
+  "thumbnail_url": "http://b.vimeocdn.com/ts/328/038/328038708_960.jpg";,
+  "duration": "230000",
   "link": [
     {
       "id": "1",
-      "length_bytes": "24836639",
+      "length_bytes": "24893958",
       "content_type": "video/mp4",
       "file_suffix": "mp4",
       "url": ""
diff -Nru libquvi-scripts-0.4.6/tests/data/format/default/youtube.json libquvi-scripts-0.4.8/tests/data/format/default/youtube.json
--- libquvi-scripts-0.4.6/tests/data/format/default/youtube.json	2012-05-27 13:40:53.000000000 +0200
+++ libquvi-scripts-0.4.8/tests/data/format/default/youtube.json	2012-08-21 09:34:12.000000000 +0200
@@ -9,9 +9,9 @@
   "link": [
     {
       "id": "1",
-      "length_bytes": "5287707",
-      "content_type": "video/x-flv",
-      "file_suffix": "flv",
+      "length_bytes": "18479570",
+      "content_type": "video/webm",
+      "file_suffix": "webm",
       "url": ""
     }
   ]
diff -Nru libquvi-scripts-0.4.6/tests/data/format/default/youtube_starttime.json libquvi-scripts-0.4.8/tests/data/format/default/youtube_starttime.json
--- libquvi-scripts-0.4.6/tests/data/format/default/youtube_starttime.json	2012-05-27 13:40:53.000000000 +0200
+++ libquvi-scripts-0.4.8/tests/data/format/default/youtube_starttime.json	2012-08-21 09:34:12.000000000 +0200
@@ -10,9 +10,9 @@
   "link": [
     {
       "id": "1",
-      "length_bytes": "84746554",
-      "content_type": "video/x-flv",
-      "file_suffix": "flv",
+      "length_bytes": "269770822",
+      "content_type": "video/webm",
+      "file_suffix": "webm",
       "url": ""
     }
   ]
diff -Nru libquvi-scripts-0.4.6/ChangeLog libquvi-scripts-0.4.8/ChangeLog
--- libquvi-scripts-0.4.6/ChangeLog	2012-06-10 12:39:29.000000000 +0200
+++ libquvi-scripts-0.4.8/ChangeLog	2012-08-21 09:56:44.000000000 +0200
@@ -1,3 +1,331 @@
+commit 94ac387
+Author: Toni Gundogdu <legatvs@gmail.com>
+Date:   2012-08-19
+
+    Bump version to 0.4.8
+
+m4/version.m4
+
+commit d4fc3d8
+Author: Toni Gundogdu <legatvs@gmail.com>
+Date:   2012-08-19
+
+    Update news for 0.4.8
+
+NEWS
+
+commit 48ca011
+Author: Toni Gundogdu <legatvs@gmail.com>
+Date:   2012-08-19
+
+    FIXME: website/bloomberg.lua
+    
+    Mark the script as "FIXME".
+
+share/Makefile.am
+tests/data/format/default/bloomberg.json
+tests/data/format/default/fixme/bloomberg.json
+
+commit bb53ee6
+Author: Toni Gundogdu <legatvs@gmail.com>
+Date:   2012-08-19
+
+    tests: default/vimeo.json: Update expected results
+
+tests/data/format/default/vimeo.json
+
+commit cc21d68
+Author: Toni Gundogdu <legatvs@gmail.com>
+Date:   2012-08-19
+
+    tests: default/soundcloud-2.json: Change media URL
+    
+    Replace the media URL that appears to be unavailable.
+
+tests/data/format/default/soundcloud-2.json
+
+commit 186b41e
+Author: Toni Gundogdu <legatvs@gmail.com>
+Date:   2012-08-19
+
+    FIX: media/gaskrank.lua: Media ID, stream URL patterns
+    
+    Update the media stream URL pattern. Parse media ID from
+    the media stream URL, instead. Croak if media title was
+    not found.
+
+share/lua/website/gaskrank.lua
+
+commit 2ffd344
+Author: Bastien Nocera <hadess@hadess.net>
+Date:   2012-08-16
+
+    souncloud.lua: Never offer placeholder as thumbnail
+
+share/lua/website/soundcloud.lua
+
+commit ee9b7fd
+Author: Toni Gundogdu <legatvs@gmail.com>
+Date:   2012-08-04
+
+    tests: format/default: Add lego.json
+
+tests/data/format/default/lego.json
+
+commit c38aa05
+Author: Toni Gundogdu <legatvs@gmail.com>
+Date:   2012-08-04
+
+    Add website/lego.lua (#107)
+    
+    Adds support for city.lego.com .
+    ref: http://sourceforge.net/apps/trac/quvi/ticket/107
+
+share/Makefile.am
+share/lua/website/lego.lua
+
+commit 41e4bd9
+Author: Toni Gundogdu <legatvs@gmail.com>
+Date:   2012-08-04
+
+    FIX: dailymotion.lua: sequence pattern (#108)
+    
+    Updates the sequence pattern to reflect the recent website changes.
+    ref: http://sourceforge.net/apps/trac/quvi/ticket/108
+
+share/lua/website/dailymotion.lua
+
+commit e4ae322
+Author: Toni Gundogdu <legatvs@gmail.com>
+Date:   2012-07-28
+
+    FIX: 101greatgoals.lua: article pattern
+    
+    The pattern for the article was broken for:
+      http://is.gd/MuYcm3
+    
+    Converted the original patch to apply.
+    
+    ref: http://article.gmane.org/gmane.comp.web.flash.quvi/89
+
+share/lua/website/101greatgoals.lua
+
+commit e5a0d97
+Author: Toni Gundogdu <legatvs@gmail.com>
+Date:   2012-05-28
+
+    totallynsfw.lua: Handle embedded media hosted elsewhere
+    
+    Some of the embedded media is hosted at pornhub. Redirect to different
+    host if detected.
+    
+    * Do not handle the RSS feed URLs
+    
+    Thanks anon.
+
+share/lua/website/totallynsfw.lua
+
+commit 282632e
+Author: Pierre Carrier <pierre@spotify.com>
+Date:   2011-04-14
+
+    Add support for BBC iPlayer (#28)
+    
+    Initial implementation based on get_iplayer, further tested and
+    fixed by Bastien Nocera <hadess@hadess.net>.
+    
+    This version does not support live streams, or radio programmes.
+    
+    Full revision history available at:
+    https://github.com/hadess/libquvi-scripts-iplayer/commits/master
+    
+    https://sourceforge.net/apps/trac/quvi/ticket/28
+
+share/Makefile.am
+share/lua/website/bbc.lua
+
+commit 67ea69d
+Author: Toni Gundogdu <legatvs@gmail.com>
+Date:   2012-07-18
+
+    Bump version to 0.4.7
+
+m4/version.m4
+
+commit 06606d1
+Author: Toni Gundogdu <legatvs@gmail.com>
+Date:   2012-07-18
+
+    Update NEWS for v0.4.7
+
+NEWS
+
+commit 78817b8
+Author: Toni Gundogdu <legatvs@gmail.com>
+Date:   2012-07-18
+
+    FIX: gaskrank.lua: stream URL, ID patterns
+    
+    Update the patterns for media stream URL and ID, reflecting the recent
+    changes made to the website.
+
+share/lua/website/gaskrank.lua
+
+commit 4e89cfb
+Author: Toni Gundogdu <legatvs@gmail.com>
+Date:   2012-07-17
+
+    tests: format/default: rm tvrain.json
+    
+    Remove tvrain.json altogether. The media URLs expire after a few days,
+    it appears.
+
+tests/data/format/default/tvrain.json
+
+commit d35282e
+Author: Toni Gundogdu <legatvs@gmail.com>
+Date:   2012-07-17
+
+    tests: format/default: Update youtube*.json files
+    
+    Update YouTube JSONs reflecting the changes made in the commit aec0afa.
+
+tests/data/format/default/youtube.json
+tests/data/format/default/youtube_starttime.json
+
+commit aec0afa
+Author: Toni Gundogdu <legatvs@gmail.com>
+Date:   2012-07-17
+
+    youtube.lua: Rewrite YouTube.choose_default
+    
+    Replace the old default behaviour:
+      Choose the lowest quality available.
+    With:
+      Either whatever YouTube returns as the first,
+      or whichever is of 480p and found first.
+
+share/lua/website/youtube.lua
+
+commit 7dfe322
+Author: Toni Gundogdu <legatvs@gmail.com>
+Date:   2012-07-17
+
+    tests: format/default. Update videa.json
+    
+    Change expected content-type and file extension.
+
+tests/data/format/default/videa.json
+
+commit e192ca0
+Author: Toni Gundogdu <legatvs@gmail.com>
+Date:   2012-07-15
+
+    tests: format/default: Add justintv.json
+
+tests/data/format/default/justintv.json
+
+commit 86baf5d
+Author: Toni Gundogdu <legatvs@gmail.com>
+Date:   2012-07-15
+
+    Add support for justin.tv and twitch.tv (#99)
+    
+    ref: http://sourceforge.net/apps/trac/quvi/ticket/99
+
+share/Makefile.am
+share/lua/website/justintv.lua
+
+commit 5c5cea7
+Author: Toni Gundogdu <legatvs@gmail.com>
+Date:   2012-07-13
+
+    tests: format/default/nsfw: Update redtube.json
+    
+    Replace the old test media URL which only returned a 'notfound.swf' file.
+
+tests/data/format/default/nsfw/redtube.json
+
+commit 8c8c0d3
+Author: Toni Gundogdu <legatvs@gmail.com>
+Date:   2012-07-13
+
+    tests: format/default: Update gaskrank.json
+    
+    Update the title reflecting the changes made to gaskrank.lua in
+    52c6f6d.
+
+tests/data/format/default/gaskrank.json
+
+commit 1aaf74a
+Author: Toni Gundogdu <legatvs@gmail.com>
+Date:   2012-07-12
+
+    tests: format/default: Update tvrain.json
+    
+    Use updated test data reflecting the script changes made to tvrain.lua
+    in 7bf1682.
+
+tests/data/format/default/tvrain.json
+
+commit 7dfbc1e
+Author: Toni Gundogdu <legatvs@gmail.com>
+Date:   2012-07-12
+
+    tvrain.lua: Change how media ID is parsed
+    
+    The old solution returned '-1' for media IDs. Parse media ID From the
+    media URL, instead.
+
+share/lua/website/tvrain.lua
+
+commit 7bf1682
+Author: Mikhail Gusarov <dottedmag@dottedmag.net>
+Date:   2012-07-11
+
+    tvrain.lua: Adjust for new URL scheme on the site
+
+share/lua/website/tvrain.lua
+
+commit d7182ac
+Author: Toni Gundogdu <legatvs@gmail.com>
+Date:   2012-07-10
+
+    FIX: vimeo.lua:115: no match: qualities (#106)
+    
+    ref: http://sourceforge.net/apps/trac/quvi/ticket/106
+
+share/lua/website/vimeo.lua
+
+commit 52c6f6d
+Author: Toni Gundogdu <legatvs@gmail.com>
+Date:   2012-07-01
+
+    FIX: gaskrank.lua: title pattern
+
+share/lua/website/gaskrank.lua
+
+commit 8eded85
+Author: Toni Gundogdu <legatvs@gmail.com>
+Date:   2012-06-24
+
+    dailymotion.lua: Make urlback pattern more liberal
+    
+    ref: http://article.gmane.org/gmane.comp.web.flash.quvi/61
+
+share/lua/website/dailymotion.lua
+
+commit 6afe8e9
+Author: Till Maas <opensource@till.name>
+Date:   2012-06-12
+
+    Support spiegel.de with SEO URLs
+    
+    Support SEO URLs on spiegel.de with paths like
+    /video/long-description-video-12345.html
+
+share/lua/website/spiegel.lua
+
 commit f0f8ad4
 Author: Toni Gundogdu <legatvs@gmail.com>
 Date:   2012-06-10
diff -Nru libquvi-scripts-0.4.6/NEWS libquvi-scripts-0.4.8/NEWS
--- libquvi-scripts-0.4.6/NEWS	2012-06-10 12:36:54.000000000 +0200
+++ libquvi-scripts-0.4.8/NEWS	2012-08-21 09:54:54.000000000 +0200
@@ -1,3 +1,49 @@
+v0.4.8  (2012-08-21) / Toni Gundogdu
+
+anon:
+  - totallynsfw.lua: Handle embedded media hosted elsewhere [e5a0d97]
+Bastien Nocera:
+  - FIX: 101greatgoals.lua: article pattern [e4ae322]
+  - souncloud.lua: Never offer placeholder as thumbnail [2ffd344]
+  and Pierre Carrier:
+  - Add support for BBC iPlayer (#28) [282632e]
+Ross Burton:
+  - Add website/lego.lua (#107) [c38aa05]
+Toni Gundogdu:
+  - FIX: dailymotion.lua: sequence pattern (#108) [41e4bd9]
+  - FIX: media/gaskrank.lua: Media ID, stream URL patterns [186b41e]
+  - FIXME: website/bloomberg.lua [48ca011]
+
+ 13 files changed, 402 insertions(+), 37 deletions(-)
+
+
+v0.4.7  (2012-07-18) / Toni Gundogdu
+
+Adam Sampson:
+  - dailymotion.lua: Make urlback pattern more liberal [8eded85]
+brunorex:
+  - Add support for justin.tv and twitch.tv (#99) [86baf5d]
+Mikhail Gusarov:
+  - tvrain.lua: Adjust for new URL scheme on the site [7bf1682]
+Till Maas:
+  - Support spiegel.de with SEO URLs [6afe8e9]
+Toni Gundogdu:
+  - FIX: gaskrank.lua: stream URL, ID patterns [78817b8]
+  - FIX: gaskrank.lua: title pattern [52c6f6d]
+  - FIX: tvrain.lua: Change how media ID is parsed [7dfbc1e]
+  - FIX: vimeo.lua:115: no match: qualities (#106) [d7182ac]
+  - youtube.lua: Rewrite YouTube.choose_default [aec0afa]
+
+      Change how youtube.lua chooses the 'default' format for
+      YouTube media URLs:
+        - Either whichever is of 480p is found first
+        - Or whatever YouTube returns as the first format
+
+      The script previously defaulted to the lowest quality.
+
+ 15 files changed, 118 insertions(+), 44 deletions(-)
+
+
 v0.4.6 (2012-06-10) / Toni Gundogdu
 
 Mikhail Gusarov:
diff -Nru libquvi-scripts-0.4.6/VERSION libquvi-scripts-0.4.8/VERSION
--- libquvi-scripts-0.4.6/VERSION	2012-06-10 12:39:29.000000000 +0200
+++ libquvi-scripts-0.4.8/VERSION	2012-08-21 09:56:44.000000000 +0200
@@ -1 +1 @@
-v0.4.6
+v0.4.8
diff -Nru libquvi-scripts-0.4.6/configure libquvi-scripts-0.4.8/configure
--- libquvi-scripts-0.4.6/configure	2012-06-10 12:39:21.000000000 +0200
+++ libquvi-scripts-0.4.8/configure	2012-08-21 09:56:32.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.67 for libquvi-scripts 0.4.6.
+# Generated by GNU Autoconf 2.67 for libquvi-scripts 0.4.8.
 #
 # Report bugs to <http://sourceforge.net/apps/trac/quvi/>.
 #
@@ -551,8 +551,8 @@
 # Identity of this package.
 PACKAGE_NAME='libquvi-scripts'
 PACKAGE_TARNAME='libquvi-scripts'
-PACKAGE_VERSION='0.4.6'
-PACKAGE_STRING='libquvi-scripts 0.4.6'
+PACKAGE_VERSION='0.4.8'
+PACKAGE_STRING='libquvi-scripts 0.4.8'
 PACKAGE_BUGREPORT='http://sourceforge.net/apps/trac/quvi/'
 PACKAGE_URL='http://quvi.sourceforge.net/'
 
@@ -1197,7 +1197,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures libquvi-scripts 0.4.6 to adapt to many kinds of systems.
+\`configure' configures libquvi-scripts 0.4.8 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1263,7 +1263,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of libquvi-scripts 0.4.6:";;
+     short | recursive ) echo "Configuration of libquvi-scripts 0.4.8:";;
    esac
   cat <<\_ACEOF
 
@@ -1347,7 +1347,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-libquvi-scripts configure 0.4.6
+libquvi-scripts configure 0.4.8
 generated by GNU Autoconf 2.67
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1364,7 +1364,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by libquvi-scripts $as_me 0.4.6, which was
+It was created by libquvi-scripts $as_me 0.4.8, which was
 generated by GNU Autoconf 2.67.  Invocation command line was
 
   $ $0 $@
@@ -2182,7 +2182,7 @@
 
 # Define the identity of the package.
  PACKAGE='libquvi-scripts'
- VERSION='0.4.6'
+ VERSION='0.4.8'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3080,7 +3080,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by libquvi-scripts $as_me 0.4.6, which was
+This file was extended by libquvi-scripts $as_me 0.4.8, which was
 generated by GNU Autoconf 2.67.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -3134,7 +3134,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-libquvi-scripts config.status 0.4.6
+libquvi-scripts config.status 0.4.8
 configured by $0, generated by GNU Autoconf 2.67,
   with options \\"\$ac_cs_config\\"
 
diff -Nru libquvi-scripts-0.4.6/debian/changelog libquvi-scripts-0.4.8/debian/changelog
--- libquvi-scripts-0.4.6/debian/changelog	2012-06-28 09:44:40.000000000 +0200
+++ libquvi-scripts-0.4.8/debian/changelog	2012-08-25 08:53:25.000000000 +0200
@@ -1,3 +1,15 @@
+libquvi-scripts (0.4.8-1) experimental; urgency=low
+
+  * New upstream release.
+
+ -- Ansgar Burchardt <ansgar@debian.org>  Sat, 25 Aug 2012 08:38:41 +0200
+
+libquvi-scripts (0.4.7-1) experimental; urgency=low
+
+  * New upstream release.
+
+ -- Ansgar Burchardt <ansgar@debian.org>  Tue, 31 Jul 2012 19:52:12 +0200
+
 libquvi-scripts (0.4.6-1) unstable; urgency=low
 
   * New upstream release.
diff -Nru libquvi-scripts-0.4.6/debian/copyright libquvi-scripts-0.4.8/debian/copyright
--- libquvi-scripts-0.4.6/debian/copyright	2012-06-28 09:43:32.000000000 +0200
+++ libquvi-scripts-0.4.8/debian/copyright	2012-08-25 08:53:24.000000000 +0200
@@ -45,6 +45,10 @@
 Copyright: 2012, Mikhail Gusarov <dottedmag@dottedmag.net>
 License: LGPL-2.1+
 
+Files: share/lua/website/lego.lua
+Copyright: 2012, Ross Burton <ross@burtonini.com>
+License: LGPL-2.1+
+
 Files: debian/*
 Copyright: 2011 Alejandro Garrido Mota <garridomota@gmail.com>
 License: GPL-3+
diff -Nru libquvi-scripts-0.4.6/doc/man7/libquvi-scripts.7 libquvi-scripts-0.4.8/doc/man7/libquvi-scripts.7
--- libquvi-scripts-0.4.6/doc/man7/libquvi-scripts.7	2012-06-10 12:39:22.000000000 +0200
+++ libquvi-scripts-0.4.8/doc/man7/libquvi-scripts.7	2012-08-21 09:56:33.000000000 +0200
@@ -124,7 +124,7 @@
 .\" ========================================================================
 .\"
 .IX Title "libquvi-scripts 7"
-.TH libquvi-scripts 7 "2012-05-27" "v0.4.6" "libquvi-scripts manual"
+.TH libquvi-scripts 7 "2012-08-01" "v0.4.8" "libquvi-scripts manual"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff -Nru libquvi-scripts-0.4.6/m4/version.m4 libquvi-scripts-0.4.8/m4/version.m4
--- libquvi-scripts-0.4.6/m4/version.m4	2012-06-10 12:28:29.000000000 +0200
+++ libquvi-scripts-0.4.8/m4/version.m4	2012-08-21 09:55:41.000000000 +0200
@@ -1 +1 @@
-m4_define([_LIBQUVI_SCRIPTS_VERSION], [0.4.6])
+m4_define([_LIBQUVI_SCRIPTS_VERSION], [0.4.8])
diff -Nru libquvi-scripts-0.4.6/share/Makefile.am libquvi-scripts-0.4.8/share/Makefile.am
--- libquvi-scripts-0.4.6/share/Makefile.am	2012-06-10 12:28:21.000000000 +0200
+++ libquvi-scripts-0.4.8/share/Makefile.am	2012-08-21 09:46:36.000000000 +0200
@@ -16,7 +16,7 @@
  lua/website/academicearth.lua \
  lua/website/arte.lua \
  lua/website/audioboo.lua \
- lua/website/bloomberg.lua \
+ lua/website/bbc.lua \
  lua/website/break.lua \
  lua/website/canalplus.lua \
  lua/website/cbsnews.lua \
@@ -30,6 +30,8 @@
  lua/website/golem.lua \
  lua/website/guardian.lua \
  lua/website/imdb.lua \
+ lua/website/justintv.lua \
+ lua/website/lego.lua \
  lua/website/liveleak.lua \
  lua/website/mgnetwork.lua \
  lua/website/metacafe.lua \
@@ -69,6 +71,7 @@
 DIST_lua+=\
  lua/website/bikeradar.lua \
  lua/website/blip.lua \
+ lua/website/bloomberg.lua \
  lua/website/francetelevisions.lua \
  lua/website/globo.lua \
  lua/website/pluzz.lua
diff -Nru libquvi-scripts-0.4.6/share/Makefile.in libquvi-scripts-0.4.8/share/Makefile.in
--- libquvi-scripts-0.4.6/share/Makefile.in	2012-06-10 12:39:21.000000000 +0200
+++ libquvi-scripts-0.4.8/share/Makefile.in	2012-08-21 09:56:33.000000000 +0200
@@ -47,6 +47,7 @@
 @WITH_FIXME_TRUE@am__append_2 = \
 @WITH_FIXME_TRUE@ lua/website/bikeradar.lua \
 @WITH_FIXME_TRUE@ lua/website/blip.lua \
+@WITH_FIXME_TRUE@ lua/website/bloomberg.lua \
 @WITH_FIXME_TRUE@ lua/website/francetelevisions.lua \
 @WITH_FIXME_TRUE@ lua/website/globo.lua \
 @WITH_FIXME_TRUE@ lua/website/pluzz.lua
@@ -88,13 +89,14 @@
 	lua/website/quvi/util.lua lua/website/101greatgoals.lua \
 	lua/website/1tvru.lua lua/website/academicearth.lua \
 	lua/website/arte.lua lua/website/audioboo.lua \
-	lua/website/bloomberg.lua lua/website/break.lua \
+	lua/website/bbc.lua lua/website/break.lua \
 	lua/website/canalplus.lua lua/website/cbsnews.lua \
 	lua/website/charlierose.lua lua/website/clipfish.lua \
 	lua/website/collegehumor.lua lua/website/dailymotion.lua \
 	lua/website/foxnews.lua lua/website/funnyordie.lua \
 	lua/website/gaskrank.lua lua/website/golem.lua \
 	lua/website/guardian.lua lua/website/imdb.lua \
+	lua/website/justintv.lua lua/website/lego.lua \
 	lua/website/liveleak.lua lua/website/mgnetwork.lua \
 	lua/website/metacafe.lua lua/website/publicsenat.lua \
 	lua/website/sapo.lua lua/website/senat.lua \
@@ -111,9 +113,9 @@
 	lua/website/totallynsfw.lua lua/website/xhamster.lua \
 	lua/website/xvideos.lua lua/website/youjizz.lua \
 	lua/website/bikeradar.lua lua/website/blip.lua \
-	lua/website/francetelevisions.lua lua/website/globo.lua \
-	lua/website/pluzz.lua lua/website/tube8.lua \
-	lua/website/keezmovies.lua
+	lua/website/bloomberg.lua lua/website/francetelevisions.lua \
+	lua/website/globo.lua lua/website/pluzz.lua \
+	lua/website/tube8.lua lua/website/keezmovies.lua
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -254,13 +256,14 @@
 	lua/website/quvi/util.lua lua/website/101greatgoals.lua \
 	lua/website/1tvru.lua lua/website/academicearth.lua \
 	lua/website/arte.lua lua/website/audioboo.lua \
-	lua/website/bloomberg.lua lua/website/break.lua \
+	lua/website/bbc.lua lua/website/break.lua \
 	lua/website/canalplus.lua lua/website/cbsnews.lua \
 	lua/website/charlierose.lua lua/website/clipfish.lua \
 	lua/website/collegehumor.lua lua/website/dailymotion.lua \
 	lua/website/foxnews.lua lua/website/funnyordie.lua \
 	lua/website/gaskrank.lua lua/website/golem.lua \
 	lua/website/guardian.lua lua/website/imdb.lua \
+	lua/website/justintv.lua lua/website/lego.lua \
 	lua/website/liveleak.lua lua/website/mgnetwork.lua \
 	lua/website/metacafe.lua lua/website/publicsenat.lua \
 	lua/website/sapo.lua lua/website/senat.lua \
diff -Nru libquvi-scripts-0.4.6/share/lua/util/charset.lua libquvi-scripts-0.4.8/share/lua/util/charset.lua
--- libquvi-scripts-0.4.6/share/lua/util/charset.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/util/charset.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2010,2012  Toni Gundogdu <legatvs@gmail.com>
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/util/content_type.lua libquvi-scripts-0.4.8/share/lua/util/content_type.lua
--- libquvi-scripts-0.4.6/share/lua/util/content_type.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/util/content_type.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,4 +1,4 @@
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2012  Toni Gundogdu <legatvs@gmail.com>
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/util/trim.lua libquvi-scripts-0.4.8/share/lua/util/trim.lua
--- libquvi-scripts-0.4.6/share/lua/util/trim.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/util/trim.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2010  Toni Gundogdu <legatvs@gmail.com>
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/version libquvi-scripts-0.4.8/share/lua/version
--- libquvi-scripts-0.4.6/share/lua/version	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/version	2012-08-21 09:56:45.000000000 +0200
@@ -1 +1 @@
-v0.4.6
+v0.4.8
diff -Nru libquvi-scripts-0.4.6/share/lua/website/101greatgoals.lua libquvi-scripts-0.4.8/share/lua/website/101greatgoals.lua
--- libquvi-scripts-0.4.6/share/lua/website/101greatgoals.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/101greatgoals.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2012  quvi project
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
@@ -55,8 +55,9 @@
 function HaOgg.check_external_content(self)
     local p = quvi.fetch(self.page_url)
 
-    local a = p:match('<div id="space4para" class="post%-type%-gvideos">(.-)</div>')
-                or error("no match: article")
+    local m = '<div .- id="space4para" class="post%-type%-gvideos">'
+              ..'.-<script (.-)</script>'
+    local a = p:match(m) or error("no match: article")
 
     -- Self-hosted, and they use YouTube
     -- http://www.101greatgoals.com/gvideos/golazo-wanchope-abila-sarmiento-junin-v-merlo-2/
diff -Nru libquvi-scripts-0.4.6/share/lua/website/1tvru.lua libquvi-scripts-0.4.8/share/lua/website/1tvru.lua
--- libquvi-scripts-0.4.6/share/lua/website/1tvru.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/1tvru.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2012  Mikhail Gusarov <dottedmag@dottedmag.net>
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/academicearth.lua libquvi-scripts-0.4.8/share/lua/website/academicearth.lua
--- libquvi-scripts-0.4.6/share/lua/website/academicearth.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/academicearth.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2010-2011  Toni Gundogdu <legatvs@gmail.com>
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/arte.lua libquvi-scripts-0.4.8/share/lua/website/arte.lua
--- libquvi-scripts-0.4.6/share/lua/website/arte.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/arte.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2012  Toni Gundogdu <legatvs@gmail.com>
 -- Copyright (C) 2011  Raphaël Droz <raphael.droz+floss@gmail.com>
 --
diff -Nru libquvi-scripts-0.4.6/share/lua/website/audioboo.lua libquvi-scripts-0.4.8/share/lua/website/audioboo.lua
--- libquvi-scripts-0.4.6/share/lua/website/audioboo.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/audioboo.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2011  Toni Gundogdu <legatvs@gmail.com>
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/bbc.lua libquvi-scripts-0.4.8/share/lua/website/bbc.lua
--- libquvi-scripts-0.4.6/share/lua/website/bbc.lua	1970-01-01 01:00:00.000000000 +0100
+++ libquvi-scripts-0.4.8/share/lua/website/bbc.lua	2012-08-21 09:56:45.000000000 +0200
@@ -0,0 +1,241 @@
+
+-- quvi
+-- Copyright (C) 2011, 2012  quvi project
+--
+-- This file is part of quvi <http://quvi.sourceforge.net/>.
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License, or (at your option) any later version.
+--
+-- This library is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+-- 02110-1301  USA
+
+
+-- TODO:
+-- - Add support for Radio programmes
+-- - Add support for live streaming
+-- - Better error messages for geolocation errors
+-- - Offer the subtitles for download somehow
+
+-- Obtained with grep -oP '(?<=service=")[^"]+(?=")' on config
+local fmt_id_lookup = {
+  high     = 'iplayer_streaming_h264_flv_high',
+  standard = 'iplayer_streaming_h264_flv',
+  low      = 'iplayer_streaming_h264_flv_lo',
+  vlow     = 'iplayer_streaming_h264_flv_vlo'
+  -- iplayer_streaming_n95_3g
+  -- iplayer_streaming_n95_wifi
+}
+
+-- Identify the script.
+function ident(self)
+    package.path = self.script_dir .. '/?.lua'
+    local C      = require 'quvi/const'
+    local r      = {}
+    r.domain     = "www.bbc.co.uk"
+    r.formats    = "default|best"
+    for k,_ in pairs(fmt_id_lookup) do
+        r.formats = r.formats .."|".. k
+    end
+    r.categories = C.proto_rtmp
+    local U      = require 'quvi/util'
+    r.handles    = U.handles(self.page_url, {r.domain}, {"/iplayer/"})
+    return r
+end
+
+-- Parse video URL.
+function parse(self)
+
+    function needs_new_authString(params)
+        if not params['authString'] then
+            return false
+        end
+        local found = false
+        for _,kind in pairs{'limelight', 'akamai', 'level3', 'sis', 'iplayertok'} do
+            if kind == params['kind'] then
+                found = true
+                break
+            end
+        end
+        if not found then return false end
+        -- We don't need to check for the mode, we already know it's what we want
+        return true
+    end
+
+    function create_uri_for_limelight_level3_iplayertok(params)
+        params.uri = params.tcurl .. '/' .. params.playpath
+    end
+
+    function process_akamai(params)
+        params.playpath = params.identifier
+        params.application = params.application or 'ondemand'
+        params.application = params.application .. '?_fcs_vhost=' .. params.server .. '&undefined'
+        params.uri = 'rtmp://' .. params.server .. ':80/' .. params.application
+        if not params.authString:find("&aifp=") then
+            params.authString = params.authString .. '&aifp=v001'
+        end
+        if not params.authString:find("&slist=") then
+            params.identifier = params.identifier:gsub('^mp[34]:', '')
+            params.authString = params.authString .. '&slist=' .. params.identifier
+        end
+        params.playpath = params.playpath .. '?' .. params.authString
+        params.uri = params.uri .. '&' .. params.authString
+        params.application = params.application .. '&' .. params.authString
+        params.tcurl = 'rtmp://' .. params.server .. ':80/' .. params.application
+    end
+
+    function process_limelight_level3(params)
+        params.application = params.application .. '?' .. params.authString
+        params.tcurl = 'rtmp://' .. params.server .. ':1935/' .. params.application
+        params.playpath = params.identifier
+        create_uri_for_limelight_level3_iplayertok(params)
+    end
+
+    function process_iplayertok(params)
+        params.identifier = params.identifier .. '?' .. params.authString
+        params.playpath = params.identifier:gsub('^mp[34]:', '')
+        params.tcurl = 'rtmp://' .. params.server .. ':1935/' .. params.application
+        create_uri_for_limelight_level3_iplayertok(params)
+    end
+
+    self.host_id = 'bbc'
+
+    local _,_,s = self.page_url:find('episode/(.-)/')
+    local episode_id = s or error('no match: episode id')
+    self.id = episode_id
+
+    local playlist_uri =
+        'http://www.bbc.co.uk/iplayer/playlist/' .. episode_id
+    local playlist = quvi.fetch(playlist_uri, {fetch_type = 'playlist'})
+
+    local pl_item_p,_,s = playlist:find('<item kind="programme".-identifier="(.-)"')
+    if not s then
+        pl_item_p,_,s = playlist:find('<item kind="radioProgramme".-identifier="(.-)"')
+        -- TODO: Implement radio support
+        if s then
+            error('No support for radio yet')
+        end
+    end
+    local media_id = s or error('no match: media id')
+
+    local _,_,s = playlist:find('duration="(%d+)"', pl_item_p)
+    self.duration = tonumber(s) or 0
+
+    local _,_,s = playlist:find('<title>(.-)</title>')
+    self.title = s or error('no match: video title')
+
+    local _,_,s = playlist:find('<link rel="holding" href="(.-)"')
+    self.media_thumbnail_url = s or ""
+
+    -- stolen from http://lua-users.org/wiki/MathLibraryTutorial
+    math.randomseed(os.time()) math.random() math.random() math.random()
+    local config_uri =
+        'http://www.bbc.co.uk/mediaselector/4/mtis/stream/' ..
+        media_id .. "?cb=" .. math.random(10000)
+
+    local config = quvi.fetch(config_uri, {fetch_type = 'config'})
+
+    available_formats = {}
+    for fmt_id in config:gmatch("iplayer_streaming_[%w_]+") do
+        available_formats[fmt_id] = true
+    end
+    -- Create the list of acceptable formats, ordered by preference
+    local r = self.requested_format
+    local preferred = ((r == 'best') and {'high', 'standard', 'low', 'vlow'})
+                   or ((r == 'default') and {'standard', 'low', 'vlow', 'high'})
+                   or {r}
+
+    -- Pick the first acceptable format available
+    local format
+    for _, cur_format in ipairs(preferred) do
+        if available_formats[fmt_id_lookup[cur_format]] then
+            format = cur_format
+            break
+        end
+    end
+    if not format then error('format not available') end
+
+    -- Iterate over <media/>s
+    local media
+    for section in config:gmatch('<media .-</media>') do
+        if section:find('service="' .. fmt_id_lookup[format] .. '"') then
+            media = section
+            break
+        end
+    end
+    if not media then error("Couldn't parse the config") end
+
+    self.url = {}
+
+    -- Initialise with the default values from the media
+    local mparams = {}
+    for _,mparam in pairs{'kind', 'service'} do
+        _,_,mparams[mparam] = media:find(mparam .. '="(.-)"')
+        -- print ("MEDIA: mparams[" .. mparam .. "] = " .. mparams[mparam])
+    end
+
+    for connection in media:gmatch('<connection .-/>') do
+        local params, complete_uri = {}, ''
+
+        for _,param in pairs{'supplier', 'server', 'application', 'identifier', 'authString', 'kind'} do
+            _,_,params[param] = connection:find(param .. '="(.-)"')
+            -- print ("CONNECTION: params[" .. param .. "] = " .. (params[param] or "(null)"))
+        end
+
+        -- Get authstring from more specific mediaselector if
+        -- this mode is specified - fails sometimes otherwise
+	if needs_new_authString(params) then
+	    local xml_url
+	    xml_uri =
+	        'http://www.bbc.co.uk/mediaselector/4/mtis/stream/' ..
+		media_id .. '/' .. mparams['service'] .. '/' .. params['kind'] ..
+		"?cb=" .. math.random(10000)
+	    xml = quvi.fetch(xml_uri, {fetch_type = 'config'})
+	    local _,_,new_authString = xml:find('authString="(.-)"')
+	    if new_authString then
+	        params['authString'] = new_authString:gsub('&amp;', '&')
+	    end
+        else
+            -- Unescape the authString
+            if params['authString'] then
+                params['authString'] = params['authString']:gsub('&amp;', '&')
+            end
+        end
+
+        -- in 'application', mp has a value containing one or more entries separated by strings.
+        -- We only keep the first entry.
+        if params.application then
+            params.application = params.application:gsub("&mp=([^,&]+),?.-&", "&mp=%1&")
+        end
+
+        if params.supplier == 'akamai' then
+            process_akamai(params)
+        end
+
+        if (params.supplier == 'limelight' or params.supplier == 'level3') then
+            process_limelight_level3(params)
+        end
+
+        params.uri = params.uri or error('Could not create RTMP URL')
+
+        complete_uri = params.uri
+            .. ' app=' .. params.application
+            .. ' playpath=' .. params.playpath
+            .. ' swfUrl=http://www.bbc.co.uk/emp/revisions/18269_21576_10player.swf?revision=18269_21576 swfVfy=1'
+            .. ' tcUrl=' .. params.tcurl
+            .. ' pageurl=' .. self.page_url
+
+        self.url[#(self.url) + 1] = complete_uri
+    end
+
+    return self
+end
diff -Nru libquvi-scripts-0.4.6/share/lua/website/bikeradar.lua libquvi-scripts-0.4.8/share/lua/website/bikeradar.lua
--- libquvi-scripts-0.4.6/share/lua/website/bikeradar.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/bikeradar.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2011-2012  quvi project
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/blip.lua libquvi-scripts-0.4.8/share/lua/website/blip.lua
--- libquvi-scripts-0.4.6/share/lua/website/blip.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/blip.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2011-2012  Toni Gundogdu <legatvs@gmail.com>
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/bloomberg.lua libquvi-scripts-0.4.8/share/lua/website/bloomberg.lua
--- libquvi-scripts-0.4.6/share/lua/website/bloomberg.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/bloomberg.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2010-2012  quvi project
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/break.lua libquvi-scripts-0.4.8/share/lua/website/break.lua
--- libquvi-scripts-0.4.6/share/lua/website/break.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/break.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2010-2012  Toni Gundogdu <legatvs@gmail.com>
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/canalplus.lua libquvi-scripts-0.4.8/share/lua/website/canalplus.lua
--- libquvi-scripts-0.4.6/share/lua/website/canalplus.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/canalplus.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2012 Paul Kocialkowski <contact@paulk.fr>
 --
 -- This file is part of libquvi-scripts <http://quvi.googlecode.com/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/cbsnews.lua libquvi-scripts-0.4.8/share/lua/website/cbsnews.lua
--- libquvi-scripts-0.4.6/share/lua/website/cbsnews.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/cbsnews.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2010-2012  Toni Gundogdu <legatvs@gmail.com>
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/charlierose.lua libquvi-scripts-0.4.8/share/lua/website/charlierose.lua
--- libquvi-scripts-0.4.6/share/lua/website/charlierose.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/charlierose.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2010-2012  quvi project
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/clipfish.lua libquvi-scripts-0.4.8/share/lua/website/clipfish.lua
--- libquvi-scripts-0.4.6/share/lua/website/clipfish.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/clipfish.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2010-2012  Toni Gundogdu <legatvs@gmail.com>
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/collegehumor.lua libquvi-scripts-0.4.8/share/lua/website/collegehumor.lua
--- libquvi-scripts-0.4.6/share/lua/website/collegehumor.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/collegehumor.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2012  Toni Gundogdu <legatvs@gmail.com>
 -- Copyright (C) 2010-2011  Lionel Elie Mamane <lionel@mamane.lu>
 --
diff -Nru libquvi-scripts-0.4.6/share/lua/website/dailymotion.lua libquvi-scripts-0.4.8/share/lua/website/dailymotion.lua
--- libquvi-scripts-0.4.6/share/lua/website/dailymotion.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/dailymotion.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2010-2012  Toni Gundogdu <legatvs@gmail.com>
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
@@ -88,7 +88,7 @@
 function Dailymotion.fetch_page(self, U)
     self.page_url = Dailymotion.normalize(self.page_url)
 
-    local s = self.page_url:match('/family_filter%?urlback=(.+)')
+    local s = self.page_url:match('[%?%&]urlback=(.+)')
     if s then
         self.page_url = 'http://dailymotion.com' .. U.unescape(s)
     end
@@ -107,7 +107,8 @@
 end
 
 function Dailymotion.iter_formats(page, U)
-    local seq = page:match('"sequence",%s+"(.-)"')
+    local seq = page:match('"sequence":"(.-)"')
+                  or error('no match: sequence')
     if not seq then
         local e = "no match: sequence"
         if page:match("_partnerplayer") then
diff -Nru libquvi-scripts-0.4.6/share/lua/website/empflix.lua libquvi-scripts-0.4.8/share/lua/website/empflix.lua
--- libquvi-scripts-0.4.6/share/lua/website/empflix.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/empflix.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2012 Paul Kocialkowski <contact@paulk.fr>
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/foxnews.lua libquvi-scripts-0.4.8/share/lua/website/foxnews.lua
--- libquvi-scripts-0.4.6/share/lua/website/foxnews.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/foxnews.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2011  Lionel Elie Mamane <lionel@mamane.lu>
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/francetelevisions.lua libquvi-scripts-0.4.8/share/lua/website/francetelevisions.lua
--- libquvi-scripts-0.4.6/share/lua/website/francetelevisions.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/francetelevisions.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2011-2012  Toni Gundogdu <legatvs@gmail.com>
 --
 -- This file is part of libquvi-scripts <http://quvi.googlecode.com/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/funnyordie.lua libquvi-scripts-0.4.8/share/lua/website/funnyordie.lua
--- libquvi-scripts-0.4.6/share/lua/website/funnyordie.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/funnyordie.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2011  Toni Gundogdu
 -- Copyright (C) 2010 quvi project
 --
diff -Nru libquvi-scripts-0.4.6/share/lua/website/gaskrank.lua libquvi-scripts-0.4.8/share/lua/website/gaskrank.lua
--- libquvi-scripts-0.4.6/share/lua/website/gaskrank.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/gaskrank.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,6 +1,6 @@
 
--- libquvi-scripts v0.4.6
--- Copyright (C) 2010  Toni Gundogdu <legatvs@gmail.com>
+-- libquvi-scripts v0.4.8
+-- Copyright (C) 2010,2012  Toni Gundogdu <legatvs@gmail.com>
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
 --
@@ -45,14 +45,14 @@
 
     local p = quvi.fetch(self.page_url)
 
-    self.title = p:match('name="description" content="(.-)"')
-                  or error("no match: media title")
+    self.title = p:match('"og:title" content="(.-)"')
+                  or error('no match: media title')
 
-    self.id = p:match('unit_long(.-)"')
-                or error("no match: media id")
+    local u = p:match("(http://movies.-%.flv)")
+                or error("no match: media stream URL")
 
-    self.url = {p:match('file=(.-)"')
-                or error ("no match: media url")}
+    self.id = u:match("/%d+/(%d+)%.%w+") or error("no match: media ID")
+    self.url = {u}
 
     return self
 end
diff -Nru libquvi-scripts-0.4.6/share/lua/website/globo.lua libquvi-scripts-0.4.8/share/lua/website/globo.lua
--- libquvi-scripts-0.4.6/share/lua/website/globo.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/globo.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2010-2012  quvi project
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/golem.lua libquvi-scripts-0.4.8/share/lua/website/golem.lua
--- libquvi-scripts-0.4.6/share/lua/website/golem.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/golem.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2010-2011  Toni Gundogdu <legatvs@gmail.com>
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/guardian.lua libquvi-scripts-0.4.8/share/lua/website/guardian.lua
--- libquvi-scripts-0.4.6/share/lua/website/guardian.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/guardian.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2011  Toni Gundogdu <legatvs@gmail.com>
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/imdb.lua libquvi-scripts-0.4.8/share/lua/website/imdb.lua
--- libquvi-scripts-0.4.6/share/lua/website/imdb.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/imdb.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 --
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2011  quvi project
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/justintv.lua libquvi-scripts-0.4.8/share/lua/website/justintv.lua
--- libquvi-scripts-0.4.6/share/lua/website/justintv.lua	1970-01-01 01:00:00.000000000 +0100
+++ libquvi-scripts-0.4.8/share/lua/website/justintv.lua	2012-08-21 09:56:45.000000000 +0200
@@ -0,0 +1,73 @@
+
+-- libquvi-scripts v0.4.8
+-- Copyright (C) 2012  quvi project <http://quvi.sourceforge.net/>
+--
+-- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License, or (at your option) any later version.
+--
+-- This library is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+-- 02110-1301  USA
+--
+
+-- Identify the script.
+function ident(self)
+    package.path  = self.script_dir .. '/?.lua'
+    local C       = require 'quvi/const'
+    local r       = {}
+    local domains = {"twitch%.tv", "justin%.tv"}
+    r.domain      = table.concat(domains, "|")
+    r.formats     = "default"
+    r.categories  = C.proto_http
+    local U       = require 'quvi/util'
+    r.handles     = U.handles(self.page_url, domains, {"/[%w_]+/b/%d+"})
+    return r
+end
+
+-- Query available formats.
+function query_formats(self)
+    self.formats = 'default'
+    return self
+end
+
+-- Parse media URL.
+function parse(self)
+    self.host_id = "justintv"
+
+    self.id = self.page_url:match("/[%w_]+/b/(%d+)")
+                or error("no match: media ID")
+
+    local c_url = "http://api.justin.tv/api/clip/show/";
+                    .. self.id .. ".xml"
+
+    local c = quvi.fetch(c_url, {fetch_type = 'config'})
+
+    self.title = c:match('<title>(.-)</title>') or ''
+
+    if #self.title ==0 then
+        c = c:gsub("^%s*(.-)%s*$", "%1") -- 'c' may hold an error message.
+        c = c:gsub("%s%s+", " ")         -- Sanitize.
+        error(string.format("no match: media title (%s)",
+                            (#c >0) and c or ''))
+    end
+
+    self.thumbnail_url =
+      c:match('<image_url_medium>(.-)</image_url_medium>') or ''
+
+    self.url = {c:match("<video_file_url>(.-)</video_file_url>")
+                  or error("no match: media URL")}
+
+    return self
+end
+
+-- vim: set ts=4 sw=4 tw=72 expandtab:
diff -Nru libquvi-scripts-0.4.6/share/lua/website/keezmovies.lua libquvi-scripts-0.4.8/share/lua/website/keezmovies.lua
--- libquvi-scripts-0.4.6/share/lua/website/keezmovies.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/keezmovies.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2010 Paul Kocialkowski <contact@paulk.fr>
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/lego.lua libquvi-scripts-0.4.8/share/lua/website/lego.lua
--- libquvi-scripts-0.4.6/share/lua/website/lego.lua	1970-01-01 01:00:00.000000000 +0100
+++ libquvi-scripts-0.4.8/share/lua/website/lego.lua	2012-08-21 09:56:45.000000000 +0200
@@ -0,0 +1,60 @@
+
+-- libquvi-scripts v0.4.8
+-- Copyright (C) 2012  Ross Burton <ross@burtonini.com>
+--
+-- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
+--
+-- This library is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU Lesser General Public
+-- License as published by the Free Software Foundation; either
+-- version 2.1 of the License, or (at your option) any later version.
+--
+-- This library is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+-- Lesser General Public License for more details.
+--
+-- You should have received a copy of the GNU Lesser General Public
+-- License along with this library; if not, write to the Free Software
+-- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+-- 02110-1301  USA
+--
+
+-- Identify the script.
+function ident(self)
+    package.path = self.script_dir .. '/?.lua'
+    local C      = require 'quvi/const'
+    local r      = {}
+    r.domain     = "city%.lego%.com"
+    r.formats    = "default"
+    r.categories = C.proto_http
+    local U      = require 'quvi/util'
+    r.handles    = U.handles(self.page_url, {r.domain}, {"/.+/Movies/.+$"})
+    return r
+end
+
+-- Query available formats.
+function query_formats(self)
+    self.formats  = "default"
+    return self
+end
+
+-- Parse video URL.
+function parse(self)
+    self.host_id = "lego"
+    local p = quvi.fetch(self.page_url)
+
+    local s = p:match('<trackingName>(.+)</trackingName>')
+              or error("no match: tracking name")
+    local index = s:find("-")
+
+    self.title = s:sub(0, index-1)
+    self.id = s:sub(index+1)
+
+    -- TODO self.thumbnail_url
+
+    self.url = {p:match('<movie>(.+)</movie>')
+               or error("no match: media stream URL")}
+
+    return self
+end
diff -Nru libquvi-scripts-0.4.6/share/lua/website/liveleak.lua libquvi-scripts-0.4.8/share/lua/website/liveleak.lua
--- libquvi-scripts-0.4.6/share/lua/website/liveleak.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/liveleak.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2010-2012  Toni Gundogdu <legatvs@gmail.com>
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/metacafe.lua libquvi-scripts-0.4.8/share/lua/website/metacafe.lua
--- libquvi-scripts-0.4.6/share/lua/website/metacafe.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/metacafe.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2011  Lionel Elie Mamane <lionel@mamane.lu>
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/mgnetwork.lua libquvi-scripts-0.4.8/share/lua/website/mgnetwork.lua
--- libquvi-scripts-0.4.6/share/lua/website/mgnetwork.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/mgnetwork.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 --
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2011  quvi project
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/pluzz.lua libquvi-scripts-0.4.8/share/lua/website/pluzz.lua
--- libquvi-scripts-0.4.6/share/lua/website/pluzz.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/pluzz.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2011  Toni Gundogdu <legatvs@gmail.com>
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/pornhub.lua libquvi-scripts-0.4.8/share/lua/website/pornhub.lua
--- libquvi-scripts-0.4.6/share/lua/website/pornhub.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/pornhub.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2012 Paul Kocialkowski <contact@paulk.fr>
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/publicsenat.lua libquvi-scripts-0.4.8/share/lua/website/publicsenat.lua
--- libquvi-scripts-0.4.6/share/lua/website/publicsenat.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/publicsenat.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2010,2012 Raphaël Droz.
 --
 -- This file is part of libquvi-scripts <http://quvi.googlecode.com/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/quvi/bit.lua libquvi-scripts-0.4.8/share/lua/website/quvi/bit.lua
--- libquvi-scripts-0.4.6/share/lua/website/quvi/bit.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/quvi/bit.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2010  Toni Gundogdu <legatvs@gmail.com>
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/quvi/const.lua libquvi-scripts-0.4.8/share/lua/website/quvi/const.lua
--- libquvi-scripts-0.4.6/share/lua/website/quvi/const.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/quvi/const.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2010  Toni Gundogdu <legatvs@gmail.com>
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/quvi/url.lua libquvi-scripts-0.4.8/share/lua/website/quvi/url.lua
--- libquvi-scripts-0.4.6/share/lua/website/quvi/url.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/quvi/url.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- A slightly modified copy of:
 
 -- URI parsing, composition and relative URL resolution
diff -Nru libquvi-scripts-0.4.6/share/lua/website/quvi/util.lua libquvi-scripts-0.4.8/share/lua/website/quvi/util.lua
--- libquvi-scripts-0.4.6/share/lua/website/quvi/util.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/quvi/util.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2010-2011  Toni Gundogdu <legatvs@gmail.com>
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/redtube.lua libquvi-scripts-0.4.8/share/lua/website/redtube.lua
--- libquvi-scripts-0.4.6/share/lua/website/redtube.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/redtube.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2012  quvi project
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/sapo.lua libquvi-scripts-0.4.8/share/lua/website/sapo.lua
--- libquvi-scripts-0.4.6/share/lua/website/sapo.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/sapo.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2010-2012  Toni Gundogdu <legatvs@gmail.com>
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/senat.lua libquvi-scripts-0.4.8/share/lua/website/senat.lua
--- libquvi-scripts-0.4.6/share/lua/website/senat.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/senat.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2012 Raphaël Droz.
 --
 -- This file is part of quvi <http://quvi.googlecode.com/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/sevenload.lua libquvi-scripts-0.4.8/share/lua/website/sevenload.lua
--- libquvi-scripts-0.4.6/share/lua/website/sevenload.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/sevenload.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2010-2012  Toni Gundogdu <legatvs@gmail.com>
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/soundcloud.lua libquvi-scripts-0.4.8/share/lua/website/soundcloud.lua
--- libquvi-scripts-0.4.6/share/lua/website/soundcloud.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/soundcloud.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2011  Bastien Nocera <hadess@hadess.net>
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
@@ -58,7 +58,9 @@
         if p == 'og:title' then
             self.title = c
         elseif p == 'og:image' then
-            self.thumbnail_url = c
+            if not c:find('placeholder%.png') then
+                self.thumbnail_url = c
+            end
         end
     end
 
diff -Nru libquvi-scripts-0.4.6/share/lua/website/spankwire.lua libquvi-scripts-0.4.8/share/lua/website/spankwire.lua
--- libquvi-scripts-0.4.6/share/lua/website/spankwire.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/spankwire.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2011-2012  quvi project
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/spiegel.lua libquvi-scripts-0.4.8/share/lua/website/spiegel.lua
--- libquvi-scripts-0.4.6/share/lua/website/spiegel.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/spiegel.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2010-2011  Toni Gundogdu <legatvs@gmail.com>
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
@@ -88,7 +88,7 @@
 --
 
 function Spiegel.get_media_id(self)
-    self.id = self.page_url:match("/video/video%-(.-)%.")
+    self.id = self.page_url:match("/video/.-video%-(.-)%.")
                 or error ("no match: media id")
 end
 
diff -Nru libquvi-scripts-0.4.6/share/lua/website/tagtele.lua libquvi-scripts-0.4.8/share/lua/website/tagtele.lua
--- libquvi-scripts-0.4.6/share/lua/website/tagtele.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/tagtele.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2012  Toni Gundogdu <legatvs@gmail.com>
 -- Copyright (C) 2010  Paul Kocialkowski <contact@paulk.fr>
 --
diff -Nru libquvi-scripts-0.4.6/share/lua/website/tcmag.lua libquvi-scripts-0.4.8/share/lua/website/tcmag.lua
--- libquvi-scripts-0.4.6/share/lua/website/tcmag.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/tcmag.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2011  quvi project
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/ted.lua libquvi-scripts-0.4.8/share/lua/website/ted.lua
--- libquvi-scripts-0.4.6/share/lua/website/ted.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/ted.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2012  Toni Gundogdu <legatvs@gmail.com>
 -- Copyright (C) 2011  Bastien Nocera <hadess@hadess.net>
 --
diff -Nru libquvi-scripts-0.4.6/share/lua/website/theonion.lua libquvi-scripts-0.4.8/share/lua/website/theonion.lua
--- libquvi-scripts-0.4.6/share/lua/website/theonion.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/theonion.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2012  Toni Gundogdu <legatvs@gmail.com>
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/tmunderground.lua libquvi-scripts-0.4.8/share/lua/website/tmunderground.lua
--- libquvi-scripts-0.4.6/share/lua/website/tmunderground.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/tmunderground.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2011-2012  Toni Gundogdu <legatvs@gmail.com>
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/tnaflix.lua libquvi-scripts-0.4.8/share/lua/website/tnaflix.lua
--- libquvi-scripts-0.4.6/share/lua/website/tnaflix.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/tnaflix.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2012 Paul Kocialkowski <contact@paulk.fr>
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/totallynsfw.lua libquvi-scripts-0.4.8/share/lua/website/totallynsfw.lua
--- libquvi-scripts-0.4.6/share/lua/website/totallynsfw.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/totallynsfw.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2011-2012  quvi project
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
@@ -20,6 +20,8 @@
 -- 02110-1301  USA
 --
 
+local TotallyNSFW = {} -- Utility functions specific to this script
+
 -- Identify the script.
 function ident(self)
     package.path = self.script_dir .. '/?.lua'
@@ -29,12 +31,25 @@
     r.formats    = "default"
     r.categories = C.proto_http
     local U      = require 'quvi/util'
-    r.handles    = U.handles(self.page_url, {r.domain}, {"/videos/.-"})
+    local is_rss = U.handles(self.page_url, {r.domain},
+                            {"/videos/rss_2%.0/?"})
+    if is_rss then -- Don't try to handle the RSS feeds
+        r.handles = false
+    else
+        r.handles = U.handles(self.page_url, {r.domain},
+                              {"/videos/.-", "/nsfw/"})
+    end
     return r
 end
 
 -- Query available formats.
 function query_formats(self)
+    local p = quvi.fetch(self.page_url)
+
+    if TotallyNSFW.is_external(self, p) then
+        return self
+    end
+
     self.formats = 'default'
     return self
 end
@@ -45,6 +60,10 @@
 
     local p = quvi.fetch(self.page_url)
 
+    if TotallyNSFW.is_external(self, p) then
+        return self
+    end
+
     self.title = p:match('<div class="hdr"><h2>(.-)</h2></div>')
                   or error ("no match: media title")
 
@@ -64,4 +83,27 @@
     return self
 end
 
+--
+-- Utility functions.
+--
+
+function TotallyNSFW.is_external(self, page)
+    local u = page:match('options=(.-)"')
+    if u then
+        if TotallyNSFW.is_hosted_at_pornhub(self, u) then
+            return true
+        end
+        -- Add more below if necessary.
+    end
+    return false
+end
+
+function TotallyNSFW.is_hosted_at_pornhub(self, url)
+    if url:match('pornhub%.com/embed_player') then
+        local c = quvi.fetch(url, {fetch_type='config'})
+        self.redirect_url = c:match('<link_url>(.-)<') or ''
+    end
+    return #self.redirect_url >0
+end
+
 -- vim: set ts=4 sw=4 tw=72 expandtab:
diff -Nru libquvi-scripts-0.4.6/share/lua/website/tube8.lua libquvi-scripts-0.4.8/share/lua/website/tube8.lua
--- libquvi-scripts-0.4.6/share/lua/website/tube8.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/tube8.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2010-2012  quvi project
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/tvlux.lua libquvi-scripts-0.4.8/share/lua/website/tvlux.lua
--- libquvi-scripts-0.4.6/share/lua/website/tvlux.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/tvlux.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2011  Toni Gundogdu <legatvs@gmail.com>
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/tvrain.lua libquvi-scripts-0.4.8/share/lua/website/tvrain.lua
--- libquvi-scripts-0.4.6/share/lua/website/tvrain.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/tvrain.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2012  Mikhail Gusarov <dottedmag@dottedmag.net>
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
@@ -29,7 +29,7 @@
     r.formats    = "default"
     r.categories = C.proto_http
     local U      = require 'quvi/util'
-    r.handles    = U.handles(self.page_url, {r.domain}, {"/teleshow/"})
+    r.handles    = U.handles(self.page_url, {r.domain}, {"/articles/"})
     return r
 end
 
@@ -43,6 +43,9 @@
 function parse(self)
     self.host_id = "tvrain"
 
+    self.id = self.page_url:match('%-(%d+)/$')
+                or error("no match: media ID")
+
     local p = quvi.fetch(self.page_url)
 
     -- tvrain uses <iframe> for the video player which constructs URL to load a
@@ -61,9 +64,6 @@
 
     local pl = quvi.fetch(u, {fetch_type='playlist'})
 
-    self.id = pl:match('<programm[^>]-id="(.-)"')
-                or error("no match: media ID")
-
     self.title = pl:match('<video[^>]-name="(.-)"')
                   or error("no match: media title")
 
diff -Nru libquvi-scripts-0.4.6/share/lua/website/videa.lua libquvi-scripts-0.4.8/share/lua/website/videa.lua
--- libquvi-scripts-0.4.6/share/lua/website/videa.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/videa.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2011  Bastien Nocera <hadess@hadess.net>
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/videobash.lua libquvi-scripts-0.4.8/share/lua/website/videobash.lua
--- libquvi-scripts-0.4.6/share/lua/website/videobash.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/videobash.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2012  Toni Gundogdu <legatvs@gmail.com>
 -- Copyright (C) 2011  Thomas Preud'homme <robotux@celest.fr>
 --
diff -Nru libquvi-scripts-0.4.6/share/lua/website/vimeo.lua libquvi-scripts-0.4.8/share/lua/website/vimeo.lua
--- libquvi-scripts-0.4.6/share/lua/website/vimeo.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/vimeo.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2010-2012  Toni Gundogdu <legatvs@gmail.com>
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
@@ -98,7 +98,7 @@
     self.id = self.page_url:match('vimeo.com/(%d+)')
                 or error("no match: media ID")
 
-    local c_url = "http://player.vimeo.com/config/"; .. self.id
+    local c_url = "http://vimeo.com/"; .. self.id
     local c = quvi.fetch(c_url, {fetch_type='config'})
 
     if c:match('<error>') then
diff -Nru libquvi-scripts-0.4.6/share/lua/website/xhamster.lua libquvi-scripts-0.4.8/share/lua/website/xhamster.lua
--- libquvi-scripts-0.4.6/share/lua/website/xhamster.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/xhamster.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2012  Toni Gundogdu <legatvs@gmail.com>
 -- Copyright (C) 2010  Paul Kocialkowski <contact@paulk.fr>
 --
diff -Nru libquvi-scripts-0.4.6/share/lua/website/xvideos.lua libquvi-scripts-0.4.8/share/lua/website/xvideos.lua
--- libquvi-scripts-0.4.6/share/lua/website/xvideos.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/xvideos.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2010-2012  quvi project
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/yfrog.lua libquvi-scripts-0.4.8/share/lua/website/yfrog.lua
--- libquvi-scripts-0.4.6/share/lua/website/yfrog.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/yfrog.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2011  Toni Gundogdu <legatvs@gmail.com>
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/youjizz.lua libquvi-scripts-0.4.8/share/lua/website/youjizz.lua
--- libquvi-scripts-0.4.6/share/lua/website/youjizz.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/youjizz.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2010-2012  quvi project
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
diff -Nru libquvi-scripts-0.4.6/share/lua/website/youtube.lua libquvi-scripts-0.4.8/share/lua/website/youtube.lua
--- libquvi-scripts-0.4.6/share/lua/website/youtube.lua	2012-06-10 12:39:30.000000000 +0200
+++ libquvi-scripts-0.4.8/share/lua/website/youtube.lua	2012-08-21 09:56:45.000000000 +0200
@@ -1,5 +1,5 @@
 
--- libquvi-scripts v0.4.6
+-- libquvi-scripts v0.4.8
 -- Copyright (C) 2010-2012  Toni Gundogdu <legatvs@gmail.com>
 --
 -- This file is part of libquvi-scripts <http://quvi.sourceforge.net/>.
@@ -192,15 +192,14 @@
     return r
 end
 
-function YouTube.choose_default(formats) -- Lowest quality available
-    local r = {width=0xffff, height=0xffff, url=nil}
-    local U = require 'quvi/util'
+function YouTube.choose_default(formats)
+    local r = formats[1] -- Either whatever YouTube returns as the first.
     for _,v in pairs(formats) do
-        if U.is_lower_quality(v,r) then
+        if v.height == 480 then -- Or, whichever is of 480p and found first.
             r = v
+            break
         end
     end
---    for k,v in pairs(r) do print(k,v) end
     return r
 end
 
diff -Nru libquvi-scripts-0.4.6/tests/data/format/default/bloomberg.json libquvi-scripts-0.4.8/tests/data/format/default/bloomberg.json
--- libquvi-scripts-0.4.6/tests/data/format/default/bloomberg.json	2012-05-27 13:40:53.000000000 +0200
+++ libquvi-scripts-0.4.8/tests/data/format/default/bloomberg.json	1970-01-01 01:00:00.000000000 +0100
@@ -1,16 +0,0 @@
-{
-  "host": "bloomberg",
-  "page_title": "Bloomberg Game Changers: Steve Jobs",
-  "page_url": "http://www.bloomberg.com/video/63722844/";,
-  "id": "66626118",
-  "format_requested": "default",
-  "link": [
-    {
-      "id": "1",
-      "length_bytes": "203586089",
-      "content_type": "video/x-flv",
-      "file_suffix": "flv",
-      "url": ""
-    }
-  ]
-}
diff -Nru libquvi-scripts-0.4.6/tests/data/format/default/fixme/bloomberg.json libquvi-scripts-0.4.8/tests/data/format/default/fixme/bloomberg.json
--- libquvi-scripts-0.4.6/tests/data/format/default/fixme/bloomberg.json	1970-01-01 01:00:00.000000000 +0100
+++ libquvi-scripts-0.4.8/tests/data/format/default/fixme/bloomberg.json	2012-08-21 09:46:36.000000000 +0200
@@ -0,0 +1,16 @@
+{
+  "host": "bloomberg",
+  "page_title": "Bloomberg Game Changers: Steve Jobs",
+  "page_url": "http://www.bloomberg.com/video/63722844/";,
+  "id": "66626118",
+  "format_requested": "default",
+  "link": [
+    {
+      "id": "1",
+      "length_bytes": "203586089",
+      "content_type": "video/x-flv",
+      "file_suffix": "flv",
+      "url": ""
+    }
+  ]
+}
diff -Nru libquvi-scripts-0.4.6/tests/data/format/default/gaskrank.json libquvi-scripts-0.4.8/tests/data/format/default/gaskrank.json
--- libquvi-scripts-0.4.6/tests/data/format/default/gaskrank.json	2012-05-27 13:40:53.000000000 +0200
+++ libquvi-scripts-0.4.8/tests/data/format/default/gaskrank.json	2012-08-21 09:34:12.000000000 +0200
@@ -1,6 +1,6 @@
 {
   "host": "gaskrank",
-  "page_title": "1 Runde - Oschersleben 14.08.2008 /Aprilia RSV 250 /Honda RVF 400 R",
+  "page_title": "1 Runde - Oschersleben Aprilia RSV 250 vs Honda RVF 400 R",
   "page_url": "http://www.gaskrank.tv/tv/rennstrecken/1-runde-oschersleben-14082008--6985.htm";,
   "id": "6985",
   "format_requested": "default",
diff -Nru libquvi-scripts-0.4.6/tests/data/format/default/justintv.json libquvi-scripts-0.4.8/tests/data/format/default/justintv.json
--- libquvi-scripts-0.4.6/tests/data/format/default/justintv.json	1970-01-01 01:00:00.000000000 +0100
+++ libquvi-scripts-0.4.8/tests/data/format/default/justintv.json	2012-08-21 09:34:12.000000000 +0200
@@ -0,0 +1,17 @@
+{
+  "host": "justintv",
+  "page_title": "TSM Dyrus 2200+ Smurf NA",
+  "page_url": "http://www.twitch.tv/tsm_dyrus/b/325011119";,
+  "id": "325011119",
+  "format_requested": "default",
+  "thumbnail_url": "http://static-cdn.jtvnw.net/jtv.thumbs/archive-325011119-150x113.jpg";,
+  "link": [
+    {
+      "id": "1",
+      "length_bytes": "967914356",
+      "content_type": "video/x-flv",
+      "file_suffix": "flv",
+      "url": ""
+    }
+  ]
+}
diff -Nru libquvi-scripts-0.4.6/tests/data/format/default/lego.json libquvi-scripts-0.4.8/tests/data/format/default/lego.json
--- libquvi-scripts-0.4.6/tests/data/format/default/lego.json	1970-01-01 01:00:00.000000000 +0100
+++ libquvi-scripts-0.4.8/tests/data/format/default/lego.json	2012-08-21 09:46:36.000000000 +0200
@@ -0,0 +1,16 @@
+{
+  "host": "lego",
+  "page_title": "Gold Run",
+  "page_url": "http://city.lego.com/en-gb/Movies/Gold%20Run.aspx";,
+  "id": "431026",
+  "format_requested": "default",
+  "link": [
+    {
+      "id": "1",
+      "length_bytes": "20933533",
+      "content_type": "application/octet-stream",
+      "file_suffix": "flv",
+      "url": ""
+    }
+  ]
+}
diff -Nru libquvi-scripts-0.4.6/tests/data/format/default/nsfw/redtube.json libquvi-scripts-0.4.8/tests/data/format/default/nsfw/redtube.json
--- libquvi-scripts-0.4.6/tests/data/format/default/nsfw/redtube.json	2012-06-08 12:23:01.000000000 +0200
+++ libquvi-scripts-0.4.8/tests/data/format/default/nsfw/redtube.json	2012-08-21 09:34:12.000000000 +0200
@@ -1,14 +1,14 @@
 {
   "host": "redtube",
-  "page_title": "Cindy Hope and Erik Everhard",
-  "page_url": "http://embed.redtube.com/player/?id=175705&style=redtube";,
-  "id": "175705",
+  "page_title": "Toni Ribas de Crucero 1",
+  "page_url": "http://www.redtube.com/179914";,
+  "id": "179914",
   "format_requested": "default",
-  "thumbnail_url": "http://img03.redtubefiles.com/_thumbs/0000175/0175705/0175705_014i.jpg";,
+  "thumbnail_url": "http://img01.redtubefiles.com/_thumbs/0000179/0179914/0179914_003i.jpg";,
   "link": [
     {
       "id": "1",
-      "length_bytes": "96253934",
+      "length_bytes": "220142123",
       "content_type": "application/octet-stream",
       "file_suffix": "flv",
       "url": ""
diff -Nru libquvi-scripts-0.4.6/tests/data/format/default/soundcloud-2.json libquvi-scripts-0.4.8/tests/data/format/default/soundcloud-2.json
--- libquvi-scripts-0.4.6/tests/data/format/default/soundcloud-2.json	2012-05-27 13:40:53.000000000 +0200
+++ libquvi-scripts-0.4.8/tests/data/format/default/soundcloud-2.json	2012-08-21 09:46:36.000000000 +0200
@@ -1,15 +1,15 @@
 {
   "host": "soundcloud",
-  "page_title": "DOROTHY LITTLE HAPPY - デモサヨナラ (DJ AMAYA VS. GROOVEBOT REMIX)",
-  "page_url": "http://soundcloud.com/dj-amaya/dorothy-little-happy-dj-amaya";,
-  "id": "6YKwEK5p4uaV",
+  "page_title": "小野恵令奈 - えれぴょん (DJ AMAYA VS. GROOVEBOT REMIX)",
+  "page_url": "http://soundcloud.com/dj-amaya/erepyon-dj-amaya-vs-groovebot-remix";,
+  "id": "x881nzdjEGqx",
   "format_requested": "default",
-  "thumbnail_url": "http://i1.sndcdn.com/artworks-000014987582-3c8xy9-t300x300.jpg?77cede1";,
-  "duration": "395303",
+  "thumbnail_url": "http://i1.sndcdn.com/artworks-000028569263-xvpb1c-t300x300.jpg?4b4189b";,
+  "duration": "343928",
   "link": [
     {
       "id": "1",
-      "length_bytes": "6322467",
+      "length_bytes": "5500759",
       "content_type": "audio/mpeg",
       "file_suffix": "mp3",
       "url": ""
diff -Nru libquvi-scripts-0.4.6/tests/data/format/default/tvrain.json libquvi-scripts-0.4.8/tests/data/format/default/tvrain.json
--- libquvi-scripts-0.4.6/tests/data/format/default/tvrain.json	2012-06-10 12:28:21.000000000 +0200
+++ libquvi-scripts-0.4.8/tests/data/format/default/tvrain.json	1970-01-01 01:00:00.000000000 +0100
@@ -1,17 +0,0 @@
-{
-  "host": "tvrain",
-  "page_title": "Парфенов и Познер от 27 мая. Полная версия. Часть 3",
-  "page_url": "http://tvrain.ru/teleshow/parfenov_i_pozner/parfenov_i_pozner_ot_27_maya_polnaya_versiya_chast_3-271745/";,
-  "id": "5214",
-  "format_requested": "default",
-  "thumbnail_url": "http://photo.tvigle.ru/res/prt/c330f15b00e2d7499a04688ae5657e5d/44/83/000001814483/pub_midle.jpg";,
-  "link": [
-    {
-      "id": "1",
-      "length_bytes": "126304168",
-      "content_type": "video/x-flv",
-      "file_suffix": "flv",
-      "url": ""
-    }
-  ]
-}
diff -Nru libquvi-scripts-0.4.6/tests/data/format/default/videa.json libquvi-scripts-0.4.8/tests/data/format/default/videa.json
--- libquvi-scripts-0.4.6/tests/data/format/default/videa.json	2012-05-27 13:40:53.000000000 +0200
+++ libquvi-scripts-0.4.8/tests/data/format/default/videa.json	2012-08-21 09:34:12.000000000 +0200
@@ -9,8 +9,8 @@
     {
       "id": "1",
       "length_bytes": "3388872",
-      "content_type": "video/x-flv",
-      "file_suffix": "flv",
+      "content_type": "video/mp4",
+      "file_suffix": "mp4",
       "url": ""
     }
   ]
diff -Nru libquvi-scripts-0.4.6/tests/data/format/default/vimeo.json libquvi-scripts-0.4.8/tests/data/format/default/vimeo.json
--- libquvi-scripts-0.4.6/tests/data/format/default/vimeo.json	2012-06-08 12:23:01.000000000 +0200
+++ libquvi-scripts-0.4.8/tests/data/format/default/vimeo.json	2012-08-21 09:46:36.000000000 +0200
@@ -4,12 +4,12 @@
   "page_url": "http://vimeo.com/42605731";,
   "id": "42605731",
   "format_requested": "default",
-  "thumbnail_url": "http://b.vimeocdn.com/ts/295/718/295718677_640.jpg";,
-  "duration": "228000",
+  "thumbnail_url": "http://b.vimeocdn.com/ts/328/038/328038708_960.jpg";,
+  "duration": "230000",
   "link": [
     {
       "id": "1",
-      "length_bytes": "24836639",
+      "length_bytes": "24893958",
       "content_type": "video/mp4",
       "file_suffix": "mp4",
       "url": ""
diff -Nru libquvi-scripts-0.4.6/tests/data/format/default/youtube.json libquvi-scripts-0.4.8/tests/data/format/default/youtube.json
--- libquvi-scripts-0.4.6/tests/data/format/default/youtube.json	2012-05-27 13:40:53.000000000 +0200
+++ libquvi-scripts-0.4.8/tests/data/format/default/youtube.json	2012-08-21 09:34:12.000000000 +0200
@@ -9,9 +9,9 @@
   "link": [
     {
       "id": "1",
-      "length_bytes": "5287707",
-      "content_type": "video/x-flv",
-      "file_suffix": "flv",
+      "length_bytes": "18479570",
+      "content_type": "video/webm",
+      "file_suffix": "webm",
       "url": ""
     }
   ]
diff -Nru libquvi-scripts-0.4.6/tests/data/format/default/youtube_starttime.json libquvi-scripts-0.4.8/tests/data/format/default/youtube_starttime.json
--- libquvi-scripts-0.4.6/tests/data/format/default/youtube_starttime.json	2012-05-27 13:40:53.000000000 +0200
+++ libquvi-scripts-0.4.8/tests/data/format/default/youtube_starttime.json	2012-08-21 09:34:12.000000000 +0200
@@ -10,9 +10,9 @@
   "link": [
     {
       "id": "1",
-      "length_bytes": "84746554",
-      "content_type": "video/x-flv",
-      "file_suffix": "flv",
+      "length_bytes": "269770822",
+      "content_type": "video/webm",
+      "file_suffix": "webm",
       "url": ""
     }
   ]

--- End Message ---
--- Begin Message ---
On Sun, 2012-09-02 at 19:41 +0200, Ansgar Burchardt wrote:
> "Adam D. Barratt" <adam@adam-barratt.org.uk> writes:
> > On Sun, 2012-09-02 at 16:43 +0200, Ansgar Burchardt wrote:
> >> I would like to include the version of libquvi-scripts currently in
> >> experimental in wheezy. It includes various fixes to continue being
> >> able to scrap information from video sites.
[...]
> > Please go ahead; thanks.
> 
> Thanks.  Uploaded as libquvi-scripts/0.4.8-2.

Unblocked; thanks.

Regards,

Adam

--- End Message ---

Reply to: