pyradio: add per-station encoding option

This commit is contained in:
magicquark 2026-02-19 02:54:00 +00:00 committed by Austin Horstman
parent fd40fa91a4
commit ebe3ca5c9c
3 changed files with 9 additions and 2 deletions

View file

@ -61,6 +61,12 @@ in
description = "Stream URL of the radio station.";
};
encoding = mkOption {
type = str;
default = "";
description = "Encoding of the station's metadata block.";
};
volume = mkOption {
type = ints.between 0 130;
default = 50;
@ -121,7 +127,7 @@ in
lib.concatStringsSep "," [
(escapeCSV station.name)
(escapeCSV station.url)
""
station.encoding
""
""
""

View file

@ -24,6 +24,7 @@
name = "DEF CON Radio (SomaFM)";
url = "https://somafm.com/defcon256.pls";
volume = 85;
encoding = "utf-8";
}
];
};

View file

@ -2,4 +2,4 @@ DEF CON Radio (SomaFM),https://somafm.com/defcon256.pls,,,,,,50
"DEF CON Radio, SomaFM",https://somafm.com/defcon256.pls,,,,,,50
"DEF CON Radio on ""SomaFM""",https://somafm.com/defcon256.pls,,,,,,50
"DEF CON Radio on ""SomaFM""",https://somafm.com/defcon256.pls,,,,,,50
DEF CON Radio (SomaFM),https://somafm.com/defcon256.pls,,,,,,85
DEF CON Radio (SomaFM),https://somafm.com/defcon256.pls,utf-8,,,,,85

1 DEF CON Radio (SomaFM) https://somafm.com/defcon256.pls 50
2 DEF CON Radio, SomaFM https://somafm.com/defcon256.pls 50
3 DEF CON Radio on "SomaFM" https://somafm.com/defcon256.pls 50
4 DEF CON Radio on "SomaFM" https://somafm.com/defcon256.pls 50
5 DEF CON Radio (SomaFM) https://somafm.com/defcon256.pls utf-8 85