X-Git-Url: http://git.videolan.org/gitweb.cgi/vlc.git/?p=vlc.git;p=vlc.git;a=blobdiff_plain;f=share%2Flua%2Fplaylist%2Fkatsomo.lua;h=46d62eb315f5ba33eb5f3720f55652742fa2ab8b;hp=5bb5e6c8fdb8544d97c04f0d5f6a416abdfb76c5;hb=7813a370498b299c9ebba8fa4d1da1eb7f971c64;hpb=fb28608b630888c43a545a4f2807a81651ef97f5 diff --git a/share/lua/playlist/katsomo.lua b/share/lua/playlist/katsomo.lua index 5bb5e6c8fd..46d62eb315 100644 --- a/share/lua/playlist/katsomo.lua +++ b/share/lua/playlist/katsomo.lua @@ -24,6 +24,7 @@ function probe() return vlc.access == "http" and string.match( vlc.path, "www.katsomo.fi" ) + and ( string.match( vlc.path, "treeId" ) or string.match( vlc.path, "progId" ) ) end function find( haystack, needle ) @@ -34,6 +35,13 @@ end -- Parse function. function parse() p = {} + if string.match( vlc.path, "progId" ) + then + programid = string.match( vlc.path, "progId=(%d+)") + path = "http://www.katsomo.fi/metafile.asx?p="..programid.."&bw=800" + table.insert(p, { path = path; } ) + return p + end while true do line = vlc.readline() @@ -42,11 +50,8 @@ function parse() then title = vlc.strings.decode_uri( find( line, "