[vlc-devel] [PATCH 3/3] liveleak.lua: Improve URL probe function

Ludovic Fauvet etix at videolan.org
Tue Oct 25 13:37:19 CEST 2016


On Tue, Oct 25, 2016, at 09:47, Marvin Scholz wrote:
> Improve the URL probe function to not match URLs like
> http://example.org/www.liveleak.com/view?i=312_1477377129
> as those should not be handled by this script.
> 
> Ref. #17488
> ---
>  share/lua/playlist/liveleak.lua | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/share/lua/playlist/liveleak.lua
> b/share/lua/playlist/liveleak.lua
> index 6811977..c7ce695 100644
> --- a/share/lua/playlist/liveleak.lua
> +++ b/share/lua/playlist/liveleak.lua
> @@ -23,7 +23,7 @@
>  -- Probe function.
>  function probe()
>      return vlc.access == "http"
> -        and string.match( vlc.path, "www.liveleak.com/view" )
> +        and string.match( vlc.path, "^www%.liveleak%.com/view" )
>  end
>  
>  -- Util function
> -- 
> 2.8.4 (Apple Git-73)

Yep, LGTM.

-- 
Ludovic Fauvet
www.videolan.org


More information about the vlc-devel mailing list