[libquvi-scripts] Another update for guardian.lua

Bastien Nocera hadess at fedoraproject.org
Tue Feb 17 13:27:57 UTC 2015


commit 6400e6a5082255450062eb753021a27770da4e1d
Author: Bastien Nocera <hadess at hadess.net>
Date:   Tue Feb 17 14:26:30 2015 +0100

    Another update for guardian.lua

 0001-guardian.lua-Update-for-website-changes.patch |   28 +++++++++++++------
 libquvi-scripts.spec                               |    5 +++-
 2 files changed, 23 insertions(+), 10 deletions(-)
---
diff --git a/0001-guardian.lua-Update-for-website-changes.patch b/0001-guardian.lua-Update-for-website-changes.patch
index 1c82fbe..3a4362b 100644
--- a/0001-guardian.lua-Update-for-website-changes.patch
+++ b/0001-guardian.lua-Update-for-website-changes.patch
@@ -1,18 +1,28 @@
-From 0c7d2826ecd1ed59cc7af358e2ea55cd1f2b0789 Mon Sep 17 00:00:00 2001
+From 1622a28581e2c4afa9061b72a05dc1c171e891f2 Mon Sep 17 00:00:00 2001
 From: Bastien Nocera <hadess at hadess.net>
-Date: Mon, 1 Sep 2014 15:55:08 +0200
+Date: Tue, 17 Feb 2015 14:25:38 +0100
 Subject: [PATCH] guardian.lua: Update for website changes
 
 See https://bugzilla.redhat.com/show_bug.cgi?id=1134853
 ---
- share/media/guardian.lua | 14 +++++++++-----
- 1 file changed, 9 insertions(+), 5 deletions(-)
+ share/media/guardian.lua | 20 ++++++++++++++------
+ 1 file changed, 14 insertions(+), 6 deletions(-)
 
 diff --git a/share/media/guardian.lua b/share/media/guardian.lua
-index c42f72c..7a00e67 100644
+index 454971c..7435204 100644
 --- a/share/media/guardian.lua
 +++ b/share/media/guardian.lua
-@@ -40,8 +40,8 @@ function parse(qargs)
+@@ -35,13 +35,17 @@ function parse(qargs)
+   qargs.duration_ms = Guardian.parse_duration(p)
+ 
+   qargs.title = (p:match('"og:title" content="(.-)"') or '')
+-                  :gsub('%s+%-%s+video','')
++  qargs.title = qargs.title:gsub('%s+%-%s+video','')
++  qargs.title = qargs.title:gsub('%s+%–%s+video','')
++
++  -- FIXME this should be more generic
++  qargs.title = qargs.title:gsub('&#x27;', "'")
+ 
    qargs.id = (p:match('prop8%s+=%s+["\'](.-)["\']') or '')
                :match('(%d+)') or ''
  
@@ -23,16 +33,16 @@ index c42f72c..7a00e67 100644
  
    qargs.streams = Guardian.iter_streams(p)
  
-@@ -75,7 +75,7 @@ function Guardian.fetch(qargs)
+@@ -75,7 +79,7 @@ function Guardian.fetch(qargs)
  end
  
  function Guardian.iter_streams(p)
 -  local u = p:match("%s+file.-:%s+'(.-)'")
-+  local u = p:match(';file=(.-)"')
++  local u = p:match('&file=(.-)&poster')
                or error('no match: media stream URL')
    local S = require 'quvi/stream'
    local s = S.stream_new(u)
-@@ -86,9 +86,13 @@ end
+@@ -86,9 +90,13 @@ end
  
  function Guardian.parse_duration(p)
    local n = tonumber(p:match('duration%:%s+"?(%d+)"?') or 0) * 1000
diff --git a/libquvi-scripts.spec b/libquvi-scripts.spec
index e8c8790..209c17d 100644
--- a/libquvi-scripts.spec
+++ b/libquvi-scripts.spec
@@ -2,7 +2,7 @@
 
 Name:           libquvi-scripts
 Version:        0.9.20131130
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        Embedded lua scripts for parsing the media details
 License:        AGPLv3+
 URL:            http://quvi.sourceforge.net
@@ -39,6 +39,9 @@ make install DESTDIR=%{buildroot} pkgconfigdir=%{_datadir}/pkgconfig/
 %{_mandir}/man7/quvi-modules*.7*
 
 %changelog
+* Tue Feb 17 2015 Bastien Nocera <bnocera at redhat.com> 0.9.20131130-4
+- Another update for guardian.lua
+
 * Mon Sep 01 2014 Bastien Nocera <bnocera at redhat.com> 0.9.20131130-3
 - Fix guardian.lua for website changes (#1134853)
 


More information about the scm-commits mailing list