1
0
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:
2023-01-30 09:47:50 +01:00
parent 139fcae7a0
commit 0e75118416
2 changed files with 46 additions and 44 deletions

View File

@@ -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 = "🌊 ";
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

View File

@@ -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;
})
];