[vlc-devel] [PATCH] newgrounds.lua: added an unnecessary script

Marvin Scholz epirat07 at gmail.com
Wed Oct 26 16:07:50 CEST 2016



On 26 Oct 2016, at 15:22, Ozancan Karataş wrote:

> Fixed: #17540
>
>     Signed-off-by: Pierre Ynard 
> [<linkfanel at yahoo.fr>](<mailto:linkfanel at yahoo.fr>)
>     ---
>     share/Makefile.am | 1 +
>     share/lua/playlist/newgrounds.lua | 44
>     +++++++++++++++++++++++++++++++++++++++
>     2 files changed, 45 insertions(+)
>     create mode 100644 share/lua/playlist/newgrounds.lua
>
>     diff --git a/share/Makefile.am b/share/Makefile.am
>     index ecd7cda..8c5db61 100644
>     --- a/share/Makefile.am
>     +++ b/share/Makefile.am
>     @@ -152,6 +152,7 @@ nobase_vlclib_DATA = \
>     lua/playlist/liveleak.luac \
>     lua/playlist/metacafe.luac \
>     lua/playlist/mpora.luac \
>     + lua/playlist/newgrounds.luac \
>     lua/playlist/pinkbike.luac \
>     lua/playlist/pluzz.luac \
>     lua/playlist/rockbox_fm_presets.luac \
>     diff --git a/share/lua/playlist/newgrounds.lua
>     b/share/lua/playlist/newgrounds.lua
>     new file mode 100644
>     index 0000000..4e9e34d
>     --- /dev/null
>     +++ b/share/lua/playlist/newgrounds.lua
>     @@ -0,0 +1,44 @@
>     +--[[
>     + $Id$
>     +
>     + Copyright © 2016 the VideoLAN team
>     +
>     + Authors: Ozancan Karatas, Pierre Ynard
>     +
>     + This program is free software; you can redistribute it and/or 
> modify
>     + it under the terms of the GNU General Public License as 
> published by
>     + the Free Software Foundation; either version 2 of the License, 
> or
>     + (at your option) any later version.
>     +
>     + This program is distributed in the hope that it will be useful,
>     + but WITHOUT ANY WARRANTY; without even the implied warranty of
>     + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
>     + GNU General Public License for more details.
>     +
>     + You should have received a copy of the GNU General Public 
> License
>     + along with this program; if not, write to the Free Software
>     + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA
>     02110-1301, USA.
>     +--]]
>     +
>     +-- Probe function.
>     +function probe()
>     + return ( vlc.access == "http" or vlc.access == "https" )
>     + and string.match( vlc.path, "newgrounds%.com/.*/%d+" )
>     +end

This is not a good probe function, please see #17488

>     +
>     +-- Parse function.
>     +function parse()
>     + while true do
>     + local line = vlc.readline()
>     + if not line then break end
>     +
>     + local path = string.match( line, 'new
>     embedController%(%[{"url":"([^"]+)"' )
>     + if path then
>     + path = string.gsub( path, "\\/", "/" )
>     + return { { path = path } }
>     + end
>     + end
>     +
>     + vlc.msg.err( "VLC didn't opened Newgrounds media URL" )
>     + return { }
>     +end
>     --
>     2.10.1.windows.1


> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list