mirror of
https://github.com/kmein/niveum
synced 2026-03-22 04:41:07 +01:00
feat(streams): remove unicode from playlist names
This commit is contained in:
@@ -3,49 +3,49 @@
|
|||||||
# soma.fm generated via: curl https://somafm.com/ | pup '.cbshort json{}' | jq 'map({logo:.children[0].children[0].src|sub("^"; "http://soma.fm"), desc: .children[2].text, station: .children[1].text})'
|
# soma.fm generated via: curl https://somafm.com/ | pup '.cbshort json{}' | jq 'map({logo:.children[0].children[0].src|sub("^"; "http://soma.fm"), desc: .children[2].text, station: .children[1].text})'
|
||||||
let
|
let
|
||||||
tags = {
|
tags = {
|
||||||
ambient = "🧘 Ambient";
|
ambient = "ambient";
|
||||||
american = "🇺🇸 USA";
|
american = "american";
|
||||||
amro = "👦 Amro";
|
amro = "dj_amro";
|
||||||
arabic = "🇱🇧 عربي";
|
arabic = "arabi";
|
||||||
balkan = "🇧🇦 Balkan";
|
balkan = "balkan";
|
||||||
berlin = "🐻 Berlin";
|
berlin = "berlin";
|
||||||
brazilian = "🇧🇷 Brasil";
|
brazilian = "brasil";
|
||||||
chill = "🧊 Chill";
|
chill = "chill";
|
||||||
chinese = "🇨🇳 中国";
|
chinese = "china";
|
||||||
classical = "🎻 Classical";
|
classical = "classical";
|
||||||
discover = "😲 Discover";
|
discover = "discover";
|
||||||
danish = "🇩🇰 Dansk";
|
danish = "denmark";
|
||||||
dnb = "🥁 DnB";
|
dnb = "dnb";
|
||||||
dubstep = "🎆 Dubstep";
|
dubstep = "dubstep";
|
||||||
french = "🇫🇷 France";
|
french = "france";
|
||||||
geschepper = "🤯 Geschepper";
|
geschepper = "geschepper";
|
||||||
greek = "🇬🇷 Ελλάδα";
|
greek = "greece";
|
||||||
greenlandic = "🇬🇱 Kalaallit Nunaat";
|
greenlandic = "greenland";
|
||||||
groovy = "🕺 Groovy";
|
groovy = "groovy";
|
||||||
holy = "⛪ Holy";
|
holy = "holy";
|
||||||
indian = "🇮🇳 भारत";
|
indian = "india";
|
||||||
irie = "🇯🇲 Irie";
|
irie = "jamaica";
|
||||||
irish = "🇮🇪 Éire";
|
irish = "ireland";
|
||||||
jazz = "🎷 Jazz";
|
jazz = "jazz";
|
||||||
lofi = "✍ Lo-Fi";
|
lofi = "lofi";
|
||||||
metal = "🤘 Metal";
|
metal = "metal";
|
||||||
party = "🪩 Party";
|
party = "party";
|
||||||
pop = "🎙 Pop";
|
pop = "pop";
|
||||||
radiorecord = "⏺ Record";
|
radiorecord = "radiorecord";
|
||||||
rap = "💸 Rap";
|
rap = "rap";
|
||||||
rock = "🎸 Rock";
|
rock = "rock";
|
||||||
russian = "🇷🇺 Россия";
|
russian = "russia";
|
||||||
schlager = "💩 Schlager";
|
schlager = "schlager";
|
||||||
soma = "🍄 σῶμα – सोमः";
|
soma = "soma";
|
||||||
text = "📚 Text";
|
text = "text";
|
||||||
top40 = "♻️ Top 40";
|
top40 = "top40";
|
||||||
trad = "👘 Trad";
|
trad = "trad";
|
||||||
trance = "🎇 Trance";
|
trance = "trance";
|
||||||
trap = "🪤 Trap";
|
trap = "trap";
|
||||||
turkish = "🇹🇷 Türkiye";
|
turkish = "turkey";
|
||||||
vintage = "🕰️ Vintage";
|
vintage = "vintage";
|
||||||
wave = "🌊 WAVE";
|
wave = "wave";
|
||||||
xmas = "🎅 Christmas";
|
xmas = "xmas";
|
||||||
};
|
};
|
||||||
|
|
||||||
# https://github.com/NixOS/nixpkgs/blob/bc06c93905f60a82d6ebbb78f78cf289257860cc/lib/trivial.nix#L281-L282
|
# https://github.com/NixOS/nixpkgs/blob/bc06c93905f60a82d6ebbb78f78cf289257860cc/lib/trivial.nix#L281-L282
|
||||||
|
|||||||
@@ -72,6 +72,8 @@ in {
|
|||||||
extraStopCommands = firewall.removeRules rules;
|
extraStopCommands = firewall.removeRules rules;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# to reset:
|
||||||
|
# ssh zaatar 'rm /var/lib/mpd/playlists/*.m3u && systemd-tmpfiles --create'
|
||||||
systemd.tmpfiles.rules = let
|
systemd.tmpfiles.rules = let
|
||||||
tags = lib.lists.unique (lib.concatMap ({tags ? [], ...}: tags) streams);
|
tags = lib.lists.unique (lib.concatMap ({tags ? [], ...}: tags) streams);
|
||||||
tagStreams = tag: lib.filter ({tags ? [], ...}: lib.elem tag tags) streams;
|
tagStreams = tag: lib.filter ({tags ? [], ...}: lib.elem tag tags) streams;
|
||||||
@@ -93,7 +95,7 @@ in {
|
|||||||
mode = "0644";
|
mode = "0644";
|
||||||
user = "mpd";
|
user = "mpd";
|
||||||
group = "mpd";
|
group = "mpd";
|
||||||
path = "/var/lib/mpd/playlist/all.m3u";
|
path = "/var/lib/mpd/playlists/all.m3u";
|
||||||
argument = makePlaylist "all" streams;
|
argument = makePlaylist "all" streams;
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user