|
In the previous pre-release I was able to add myself icons for radio-thumbs of stations that did not have an icon, by adding a png-file with the exact station name (and leaving off the .png extension). Thanks, Gerard |
Replies: 1 comment
def loader(self) -> None:
# ...
identity = f"{station.icon}\n{station.stream_url}"
filename = f"{filename_safe(station.title)}-{hashlib.sha256(identity.encode()).hexdigest()[:10]}"Presuming import hashlib
def filename_safe(text: str, sub: str = "") -> str:
for cha in '/\\<>:"|?*':
text = text.replace(cha, sub)
return text.rstrip(" .")
f"{filename_safe("7 Rays Radio"}-{hashlib.sha256("\nhttps://radiowhatever.com/stream".encode()).hexdigest()[:10]}"Which spits out Honestly just open a feature request for nice setting of radio icons in the UI if there isn't one already. |
Presuming
iconwill be an empty string, I suppose you could executepythonand feed it the following:Which spits out
'7 Rays Radio-5e061a95ef'Honestly just open a feature request for nice setting of radio icons in the UI if there isn't o…