[vlc-commits] lua: remove tvrage

Rémi Denis-Courmont git at videolan.org
Tue Apr 11 19:45:09 CEST 2017


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Apr 11 20:44:40 2017 +0300| [377f9ffef06e489ed7f017d8ed79f692788a3650] | committer: Rémi Denis-Courmont

lua: remove tvrage

This online service went dark some time ago.

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

 share/Makefile.am                 |  3 --
 share/lua/meta/fetcher/tvrage.lua | 85 ---------------------------------------
 2 files changed, 88 deletions(-)

diff --git a/share/Makefile.am b/share/Makefile.am
index 9622e90270..c9a2f63268 100644
--- a/share/Makefile.am
+++ b/share/Makefile.am
@@ -128,7 +128,6 @@ nobase_vlclib_DATA = \
 	lua/meta/art/03_lastfm.luac \
 	lua/meta/art/01_googleimage.luac \
 	lua/meta/art/00_musicbrainz.luac \
-	lua/meta/fetcher/tvrage.luac \
 	lua/meta/reader/filename.luac \
 	lua/modules/common.luac \
 	lua/modules/dkjson.luac \
@@ -164,7 +163,6 @@ nobase_doc_DATA = \
 	lua/meta/art/README.txt \
 	lua/meta/art/01_googleimage.lua \
 	lua/meta/fetcher/README.txt \
-	lua/meta/fetcher/tvrage.lua \
 	lua/meta/reader/README.txt \
 	lua/meta/reader/filename.lua \
 	lua/playlist/README.txt \
@@ -206,7 +204,6 @@ EXTRA_DIST += \
 	lua/meta/art/01_googleimage.lua \
 	lua/meta/art/00_musicbrainz.lua \
 	lua/meta/fetcher/README.txt \
-	lua/meta/fetcher/tvrage.lua \
 	lua/meta/reader/README.txt \
 	lua/meta/reader/filename.lua \
 	lua/modules/common.lua \
diff --git a/share/lua/meta/fetcher/tvrage.lua b/share/lua/meta/fetcher/tvrage.lua
deleted file mode 100644
index 9f7e0a30ca..0000000000
--- a/share/lua/meta/fetcher/tvrage.lua
+++ /dev/null
@@ -1,85 +0,0 @@
---[[
- Gets metas for tv episode using tvrage.
-
- $Id$
- Copyright © 2010 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 descriptor()
-    return { scope="network" }
-end
-
--- Replace non alphanumeric char by +
-function get_query( title )
-    -- If we have a .EXT remove the extension.
-    str = string.gsub( title, "(.*)%....$", "%1" )
-    return string.gsub( str, "([^%w ])",
-         function (c) return string.format ("%%%02X", string.byte(c)) end)
-end
-
-function fetch_meta()
-    local metas = vlc.item:metas()
-
-    local showName = metas["showName"]
-    if not showName then
-        return false
-    end
-
-    local seasonNumber = metas["seasonNumber"];
-    if not seasonNumber then
-        return false
-    end
-
-    local episodeNumber = metas["episodeNumber"];
-    if not episodeNumber then
-        return false
-    end
-
-    local fd = vlc.stream("http://services.tvrage.com/feeds/search.php?show=" .. get_query(showName))
-    if not fd then return nil end
-    local page = fd:read( 65653 )
-    fd = nil
-    _, _, showid = string.find( page, "<showid>(.-)</showid>" )
-    if not showid then
-        return false
-    end
-
-    fd = vlc.stream("http://services.tvrage.com/feeds/full_show_info.php?sid=" .. showid)
-    if not fd then return nil end
-    page = fd:read( 65653 )
-    fd = nil
-    _, _, season = string.find(page, "<Season no=\""..seasonNumber.."\">(.-)</Season>")
-    if not season then
-        return false
-    end
-
-    _, _, episode = string.find(season, "<episode>(.-<seasonnum>"..episodeNumber.."</seasonnum>.-)</episode>")
-    if not episode then
-        return false
-    end
-
-    _, _, title, artwork = string.find(episode, "<title>(.-)</title><screencap>(.-)</screencap>")
-    if not title then
-        return false
-    end
-
-    vlc.item:set_meta("title", showName.. " S"..seasonNumber.."E"..episodeNumber.." - ".. title)
-    vlc.item:set_meta("artwork_url", artwork)
-    vlc.item:set_meta("episodeName", title)
-
-    return true
-end



More information about the vlc-commits mailing list