[vlc-commits] lua playlist: extend pluzz.lua to handle france4.

Francois Cartegnie git at videolan.org
Fri Feb 17 01:00:45 CET 2012


vlc/vlc-2.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Feb 13 13:46:40 2012 +0100| [d3587998694f919d8e91c00c55a35c649e70ea84] | committer: Jean-Baptiste Kempf

lua playlist: extend pluzz.lua to handle france4.

Some pluzz streams are only available on shows pages.
(cherry picked from commit 951ced78cd13a9ae3837b3cce9acae3533e781d4)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=d3587998694f919d8e91c00c55a35c649e70ea84
---

 share/lua/playlist/pluzz.lua |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/share/lua/playlist/pluzz.lua b/share/lua/playlist/pluzz.lua
index f0db91f..4a84314 100644
--- a/share/lua/playlist/pluzz.lua
+++ b/share/lua/playlist/pluzz.lua
@@ -25,6 +25,7 @@ function probe()
     return vlc.access == "http"
         and string.match( vlc.path, "pluzz.fr/%w+" )
         or string.match( vlc.path, "info.francetelevisions.fr/.+")
+        or string.match( vlc.path, "france4.fr/%w+")
 end
 
 -- Helpers
@@ -53,6 +54,19 @@ function parse()
         end
     end
 
+    if string.match ( vlc.path, "www.france4.fr/%w+" ) then
+        while true do
+            line = vlc.readline()
+            if not line then break end
+	    -- maybe we should get id from tags having video/cappuccino type instead
+            if string.match( line, "id=\"lavideo\"" ) then
+                _,_,redirect = string.find (line, "href=\"(.-)\"" )
+                print ("redirecting to: " .. redirect )
+                return { { path = redirect } }
+            end
+        end
+    end
+
     if string.match ( vlc.path, "info.francetelevisions.fr/.+" ) then
         title = ""
         arturl = "http://info.francetelevisions.fr/video-info/player_sl/Images/PNG/gene_ftv.png"



More information about the vlc-commits mailing list