[vlc-devel] [PATCH] youtube_homepage.lua: remove broken script

Pierre Ynard linkfanel at yahoo.fr
Sun Oct 30 11:05:42 CET 2016


This must have long been broken, also if anything this should really be
a service discovery script instead.

Ref. #17488


diff --git a/share/Makefile.am b/share/Makefile.am
index 63da4d2..e0303ab 100644
--- a/share/Makefile.am
+++ b/share/Makefile.am
@@ -159,7 +159,6 @@ nobase_vlclib_DATA = \
 	lua/playlist/vimeo.luac \
 	lua/playlist/vocaroo.luac \
 	lua/playlist/youtube.luac \
-	lua/playlist/youtube_homepage.luac \
 	lua/playlist/zapiks.luac \
 	lua/sd/fmc.luac \
 	lua/sd/icecast.luac \
@@ -251,7 +250,6 @@ EXTRA_DIST += \
 	lua/playlist/vimeo.lua \
 	lua/playlist/vocaroo.lua \
 	lua/playlist/youtube.lua \
-	lua/playlist/youtube_homepage.lua \
 	lua/playlist/zapiks.lua \
 	lua/sd/README.txt \
 	lua/sd/fmc.lua \
diff --git a/share/lua/playlist/youtube_homepage.lua b/share/lua/playlist/youtube_homepage.lua
deleted file mode 100644
index 533e558..0000000
--- a/share/lua/playlist/youtube_homepage.lua
+++ /dev/null
@@ -1,53 +0,0 @@
---[[
-  Parse YouTube homepage and browse pages. Next step is to recode firefox
-  in VLC ... using Lua of course ;)
-
- $Id$
-
- Copyright © 2007 the VideoLAN team
-
- 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.
---]]
-
-function probe()
-    return vlc.access == "http" and ( string.match( vlc.path, "youtube.com/%?$" ) or string.match( vlc.path, "youtube.com/browse" ) )
-end
-
-function parse()
-    p = {}
-    while true
-    do
-        line = vlc.readline()
-        if not line then break end
-        for _path, _artist, _name in string.gmatch( line, "href=\"(/watch%?v=[^\"]*)\" onclick=\"_hbLink%('([^']*)','Vid[^\']*'%);\">([^<]*)</a><br/>" )
-        do
-            path = "http://www.youtube.com" .. _path
-            name = vlc.strings.resolve_xml_special_chars( _name )
-            artist = _artist
-        end
-        for _min, _sec in string.gmatch( line, "<span class=\"runtime\">(%d*):(%d*)</span>" )
-        do
-            duration = 60 * _min + _sec
-        end
-        if path and name and artist and duration then
-            table.insert( p, { path = path; name = name; artist = artist; duration = duration } )
-            path = nil
-            name = nil
-            artist = nil
-            duration = nil
-        end
-    end
-    return p
-end


-- 
Pierre Ynard
"Une âme dans un corps, c'est comme un dessin sur une feuille de papier."


More information about the vlc-devel mailing list