Linux ns1.utparral.edu.mx 6.8.0-79-generic #79~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 15 16:54:53 UTC 2 x86_64
Apache/2.4.58 (Unix) OpenSSL/1.1.1w PHP/8.2.12 mod_perl/2.0.12 Perl/v5.34.1
: 10.10.1.9 | : 10.10.1.254
Cant Read [ /etc/named.conf ]
daemon
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
README
+ Create Folder
+ Create File
/
usr /
share /
grilo-plugins /
grl-lua-factory /
[ HOME SHELL ]
Name
Size
Permission
Action
grl-acoustid.lua
7.95
KB
-rw-r--r--
grl-appletrailers.gresource
2.46
KB
-rw-r--r--
grl-appletrailers.lua
3.95
KB
-rw-r--r--
grl-euronews.gresource
2.91
KB
-rw-r--r--
grl-euronews.lua
4.28
KB
-rw-r--r--
grl-guardianvideos.gresource
4.51
KB
-rw-r--r--
grl-guardianvideos.lua
4.31
KB
-rw-r--r--
grl-itunes-podcast.gresource
530.2
KB
-rw-r--r--
grl-itunes-podcast.lua
7.72
KB
-rw-r--r--
grl-lastfm-cover.lua
2.6
KB
-rw-r--r--
grl-musicbrainz-coverart.lua
2.96
KB
-rw-r--r--
grl-radiofrance.gresource
8.39
KB
-rw-r--r--
grl-radiofrance.lua
3.62
KB
-rw-r--r--
grl-steam-store.lua
3.65
KB
-rw-r--r--
grl-theaudiodb-cover.lua
3.4
KB
-rw-r--r--
grl-thegamesdb.lua
8.97
KB
-rw-r--r--
grl-video-title-parsing.lua
4.27
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : grl-euronews.lua
--[[ * Copyright (C) 2014 Bastien Nocera * * Contact: Bastien Nocera <hadess@hadess.net> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; version 2.1 of * the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA * --]] LANG_EN = "en" EURONEWS_URL = 'https://%s.euronews.com/api/watchlive.json' local langs = { arabic = "Arabic", de = "German", en = "English", es = "Spanish; Castilian", fa = "Persian", fr = "French", gr = "Greek, Modern (1453-)", hu = "Hungarian", it = "Italian", pt = "Portuguese", ru = "Russian", tr = "Turkish", } local num_callbacks = 0 --------------------------- -- Source initialization -- --------------------------- source = { id = "grl-euronews-lua", name = "Euronews", description = "A source for watching Euronews online", supported_keys = { "id", "title", "url" }, supported_media = 'video', icon = 'resource:///org/gnome/grilo/plugins/euronews/euronews.svg', tags = { 'news', 'tv', 'net:internet', 'net:plaintext' } } ------------------ -- Source utils -- ------------------ function grl_source_browse(media_id) if grl.get_options("skip") > 0 then grl.callback() return end for lang in pairs(langs) do num_callbacks = num_callbacks + 1 end for lang in pairs(langs) do local api_url = get_api_url(lang) grl.fetch(api_url, euronews_initial_fetch_cb, lang) end end ------------------------ -- Callback functions -- ------------------------ function euronews_initial_fetch_cb(results, lang) local json = {} json = grl.lua.json.string_to_table(results) -- pfp: youtube, uses videoId for url -- jw: will provide an url to request video if not json or (json.player ~= "pfp" and json.player ~= "jw") or (json.player == "pfp" and not json.videoId) or (json.player == "jw" and not json.url) then local api_url = get_api_url(lang) grl.warning ("Initial fetch failed for: " .. api_url) callback_done() return end if json.player == "pfp" then item = {} item.primary = string.format("https://www.youtube.com/watch?v=%s", json.videoId) local media = create_media(lang, item) if media ~= nil then grl.callback(media, -1) end callback_done() return end local streaming_lang = json.url:match("://euronews%-(..)%-p%-api") if lang ~= LANG_EN and streaming_lang == LANG_EN then grl.debug("Skipping " .. langs[lang] .. " as it redirects to " .. langs[LANG_EN] .. " stream.") callback_done() return end grl.fetch("https:" .. json.url, euronews_fetch_cb, lang) end -- return all the media found function euronews_fetch_cb(results, lang) local json = {} json = grl.lua.json.string_to_table(results) if not json or json.status ~= "ok" or not json.primary then local api_url = get_api_url(lang) grl.warning("Fetch failed for: " .. api_url) callback_done() return end local media = create_media(lang, json) if media ~= nil then grl.callback(media, -1) end callback_done() end ------------- -- Helpers -- ------------- function callback_done() num_callbacks = num_callbacks - 1 -- finalize operation if num_callbacks == 0 then grl.callback() end end function get_api_url(id) if not langs[id] then grl.warning('Could not find language ' .. id) return id end return string.format(EURONEWS_URL, id == LANG_EN and "www" or id) end function get_lang(id) if not langs[id] then grl.warning('Could not find language ' .. id) return id end return grl.dgettext('iso_639', langs[id]) end function create_media(lang, item) local media = {} media.type = "video" media.id = lang media.title = "Euronews " .. get_lang(lang) media.url = item.primary return media end
Close