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-musicbrainz-coverart.lua
--[[ * Copyright (C) 2014 Victor Toso. * * 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 * --]] --------------------------- -- Source initialization -- --------------------------- source = { id = "grl-musicbrainz-coverart", name = "Musicbrainz Cover Art", description = "a source for coverart", supported_keys = { "thumbnail" }, supported_media = { 'audio', 'video' }, resolve_keys = { ["type"] = "audio", required = { "mb-release-id" }, }, tags = { 'music', 'net:internet' }, } netopts = { user_agent = "Grilo Source Musicbrainz/0.3.8", } MUSICBRAINZ_DEFAULT_QUERY = "https://coverartarchive.org/%s/%s" MUSICBRAINZ_RELEASES = { {name = "release", id = "mb_release_id"}, {name = "release-group", id = "mb_release_group_id"} } --------------------------------- -- Handlers of Grilo functions -- --------------------------------- function grl_source_resolve() req = grl.get_media_keys() if not req then grl.callback() return end -- try to get the cover art associated with the mb_album_id -- if it does not exist, try the mb_release_group_id one -- if none of them exist, return nothing. local urls = {} for _, release in ipairs(MUSICBRAINZ_RELEASES) do id = req[release.id] if id and #id > 0 then urls[#urls + 1] = string.format(MUSICBRAINZ_DEFAULT_QUERY, release.name, id) end end grl.fetch(urls, netopts, fetch_results_cb) end --------------- -- Utilities -- --------------- function fetch_results_cb(results) local json_results = nil for index, feed in ipairs(results) do local json = grl.lua.json.string_to_table (feed) if json and json.images then json_results = json.images break end end if not json_results then grl.callback() return end media = build_media(json_results) grl.callback(media) end function build_media(results) local media = {} local res = {} if results and #results > 0 then local result = results[1] -- force urls to https res[1] = result.image and result.image:gsub("http://", "https://") or nil if result.thumbnails then for _, url in pairs(result.thumbnails) do res[#res + 1] = url and url:gsub("http://", "https://") or nil end end end media.thumbnail = res return media end
Close