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-theaudiodb-cover.lua
--[[ * Copyright © 2018 The Grilo Developers. * * Contact: Jean Felder <jfelder@gnome.org> * * 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-theaudiodb-cover", name = "TheAudioDB Cover", description = "a source for album covers and artist art", supported_keys = { 'thumbnail' }, supported_media = { 'audio' }, config_keys = { required = { "api-key" }, }, resolve_keys = { ["type"] = "audio", required = { "artist" }, optional = { "album" }, }, tags = { 'music', 'net:internet' }, } netopts = { user_agent = "Grilo Source TheAudioDB/0.3.8", } ------------------ -- Source utils -- ------------------ theaudiodb = {} covers_fields = { album = {"strAlbumThumb", "strAlbumThumbBack", "strAlbumCDart", "strAlbumSpine"}, artists = {"strArtistThumb", "strArtistClearart", "strArtistFanart", "strArtistFanart2", "strArtistFanart3"} } THEAUDIODB_ROOT_URL = "https://theaudiodb.com/api/v1/json/%s/" THEAUDIODB_SEARCH_ALBUM = THEAUDIODB_ROOT_URL .. "searchalbum.php?s=%s&a=%s" THEAUDIODB_SEARCH_ARTIST = THEAUDIODB_ROOT_URL .. "search.php?s=%s" --------------------------------- -- Handlers of Grilo functions -- --------------------------------- function grl_source_init (configs) theaudiodb.api_key = configs.api_key return true end -- Resolve operation is able to download artist arts or album cover arts. -- To download an album cover art, both artist and album keys have to be set. -- To download an artist art, only the artist key has to be set. function grl_source_resolve() local url, keys local artist, album local search_type keys = grl.get_media_keys() if not keys.artist or #keys.artist == 0 then grl.callback() return end -- Prepare artist and optional album strings to the url artist = grl.encode(keys.artist) if keys.album and #keys.album > 0 then search_type = "album" album = grl.encode(keys.album) url = string.format(THEAUDIODB_SEARCH_ALBUM, theaudiodb.api_key, artist, album) else search_type = "artists" url = string.format(THEAUDIODB_SEARCH_ARTIST, theaudiodb.api_key, artist) end grl.fetch(url, netopts, fetch_cb, search_type) end --------------- -- Utilities -- --------------- function fetch_cb(result, search_type) local json = {} if not result then grl.callback() return end json = grl.lua.json.string_to_table(result) if not json or not json[search_type] or #json[search_type] == 0 then grl.callback() return end local media = {} local thumb = {} for _, val in ipairs(covers_fields[search_type]) do thumb[#thumb + 1] = json[search_type][1][val] or nil end media.thumbnail = thumb grl.callback(media) end
Close