diff --git a/modules/programs/pyradio.nix b/modules/programs/pyradio.nix index c60d7100..b8ebdb44 100644 --- a/modules/programs/pyradio.nix +++ b/modules/programs/pyradio.nix @@ -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 "" "" "" diff --git a/tests/modules/programs/pyradio/custom-stations.nix b/tests/modules/programs/pyradio/custom-stations.nix index 372901b1..0a0b4ec8 100644 --- a/tests/modules/programs/pyradio/custom-stations.nix +++ b/tests/modules/programs/pyradio/custom-stations.nix @@ -24,6 +24,7 @@ name = "DEF CON Radio (SomaFM)"; url = "https://somafm.com/defcon256.pls"; volume = 85; + encoding = "utf-8"; } ]; }; diff --git a/tests/modules/programs/pyradio/expected-stations.csv b/tests/modules/programs/pyradio/expected-stations.csv index 1c697996..31f435b7 100644 --- a/tests/modules/programs/pyradio/expected-stations.csv +++ b/tests/modules/programs/pyradio/expected-stations.csv @@ -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