diff --git a/modules/programs/pyradio.nix b/modules/programs/pyradio.nix index 6e403734..5bf5eefe 100644 --- a/modules/programs/pyradio.nix +++ b/modules/programs/pyradio.nix @@ -97,6 +97,12 @@ in description = "URL of an icon to be shown in desktop notifications."; }; + profile = mkOption { + type = str; + default = ""; + description = "Name of the profile to use when using mpv or mplayer."; + }; + volume = mkOption { type = ints.between 0 130; default = 50; @@ -159,7 +165,7 @@ in (escapeCSV station.url) station.encoding (escapeCSV station.iconUrl) - "" + (escapeCSV station.profile) (lib.optionalString ( station.buffering != null ) "${toString station.buffering.seconds}@${toString station.buffering.bitrate}") diff --git a/tests/modules/programs/pyradio/custom-stations.nix b/tests/modules/programs/pyradio/custom-stations.nix index 347ae5f2..5f567943 100644 --- a/tests/modules/programs/pyradio/custom-stations.nix +++ b/tests/modules/programs/pyradio/custom-stations.nix @@ -28,6 +28,7 @@ encoding = "utf-8"; iconUrl = "https://somafm.com/img3/defcon400.png"; forceHttp = true; + profile = "loud-mode"; } ]; }; diff --git a/tests/modules/programs/pyradio/expected-stations.csv b/tests/modules/programs/pyradio/expected-stations.csv index 492ec6c3..4c5467da 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,,,,,0,50 "DEF CON Radio, SomaFM",https://somafm.com/defcon256.pls,,,,,0,50 "DEF CON Radio on ""SomaFM""",https://somafm.com/defcon256.pls,,,,,0,50 "DEF CON Radio on ""SomaFM""",https://somafm.com/defcon256.pls,,,,,0,50 -DEF CON Radio (SomaFM),https://somafm.com/defcon256.pls,utf-8,https://somafm.com/img3/defcon400.png,,10@128,1,85 +DEF CON Radio (SomaFM),https://somafm.com/defcon256.pls,utf-8,https://somafm.com/img3/defcon400.png,loud-mode,10@128,1,85