Hacker Public Radio

Your ideas, projects, opinions - podcasted.

New episodes Monday through Friday.


HPR4585: mpv util scripts

Hosted by candycanearter on 2026-02-27 00:00:00
Download or Listen

HPR Comments


candycanearter07 says: updated script

RE: hpr4585::2026-02-27 mpv util scripts by candycanearterfrom the series Bash Scripting.
00:11:55 Listen in ogg, opus, or mp3 format.
local function resolve_missing_cover(domain)
print("looking for " .. (domain or "nil"))
local extico = {
["hub.hackerpublicradio.org"] = "https://hackerpublicradio.org/images/hpr_logo.png",
-- yes using a product picture is silly but so is not featuring your icon ANYWHERE else
["anonradio.net"] = "https://sdf.org/store/thumbs/anon3.jpg",
["archives.anonradio.net"] = "https://sdf.org/store/thumbs/anon3.jpg",
["hashnix.club"] = "default",
["radio.kingposs.com"] = "https://kingposs.com/assets/buttons/PossBadge.gif"
}

if domain then
local force = extico[domain]
if force == "default" then return resolve_missing_cover() end
if force and mp.commandv("video-add", force, "auto", "domainhardcode.png") then return end

local favico = "https://" .. domain .. "/favicon.ico"
print(favico)
if mp.commandv("video-add", favico, "auto", "favico.png") then return end
end

mp.command("video-add ~~/cover.png auto default.png")
end

Mastodon Comments



More Information...


Copyright Information

Unless otherwise stated, our shows are released under a Creative Commons Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) license.

The HPR Website Design is released to the Public Domain.