[vlc-commits] vimeo.lua: remove tabs and debug output

Pierre Ynard git at videolan.org
Wed Sep 12 21:10:19 CEST 2012


vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Wed Sep 12 21:09:52 2012 +0200| [ecddf0b63594b62dfb6c89c0a73ccf669f1f581b] | committer: Pierre Ynard

vimeo.lua: remove tabs and debug output

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

 share/lua/playlist/vimeo.lua |   29 ++++++++++++++---------------
 1 file changed, 14 insertions(+), 15 deletions(-)

diff --git a/share/lua/playlist/vimeo.lua b/share/lua/playlist/vimeo.lua
index 6d38880..9005605 100644
--- a/share/lua/playlist/vimeo.lua
+++ b/share/lua/playlist/vimeo.lua
@@ -36,19 +36,18 @@ end
 function probe()
     return vlc.access == "http"
         and string.match( vlc.path, "vimeo.com/%d+$" )
-	-- do not match other addresses,
-	-- else we'll also try to decode the actual video url
+        -- do not match other addresses,
+        -- else we'll also try to decode the actual video url
 end
 
 -- Parse function.
 function parse()
     if string.match ( vlc.path, "vimeo.com/%d+$" ) then
-		vlc.msg.warn("matched "..vlc.path)
         _,_,id = string.find( vlc.path, "vimeo.com/([0-9]*)")
         prefres = get_prefres()
-		ishd = false
-		quality = "sd"
-		codec = nil
+        ishd = false
+        quality = "sd"
+        codec = nil
         while true do
             line = vlc.readline()
             if not line then break end
@@ -80,32 +79,32 @@ function parse()
             end
             -- Try to find the available codecs
             if string.match( line, "{config:.*,\"files\":{\"vp6\":" ) then
-				codec = "vp6"
+                codec = "vp6"
             end
             if string.match( line, "{config:.*,\"files\":{\"vp8\":" ) then
-				codec = "vp8"
+                codec = "vp8"
             end
             if string.match( line, "{config:.*,\"files\":{\"h264\":" ) then
-				codec = "h264"
+                codec = "h264"
             end
             -- Try to find whether video is HD actually
             if string.match( line, "{config:.*,\"hd\":1" ) then
-				ishd = true
+                ishd = true
             end
             if string.match( line, "{config:.*\"height\":" ) then
                 _,_,height = string.find (line, "\"height\":([0-9]*)," )
             end
         end
 
-		if not codec then
-			vlc.msg.warn("unable to find codec info")
-			return nil
-		end
+        if not codec then
+            vlc.msg.warn("unable to find codec info")
+            return nil
+        end
 
         if ishd and ( not height or prefres < 0 or prefres >= tonumber(height) ) then
             quality = "hd"
         end
-		path = "http://player.vimeo.com/play_redirect?quality="..quality.."&codecs="..codec.."&clip_id="..id.."&time="..tstamp.."&sig="..rsig.."&type=html5_desktop_local"
+        path = "http://player.vimeo.com/play_redirect?quality="..quality.."&codecs="..codec.."&clip_id="..id.."&time="..tstamp.."&sig="..rsig.."&type=html5_desktop_local"
         return { { path = path; name = name; arturl = arturl, duration = duration } }
     end
     return {}



More information about the vlc-commits mailing list