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