From 1efaaf2072017f2e0bd1cb2e243a5e9f9846970a Mon Sep 17 00:00:00 2001 From: magicquark <198001825+magicquark@users.noreply.github.com> Date: Thu, 19 Feb 2026 03:05:05 +0000 Subject: [PATCH] pyradio: add per-station icon url option --- modules/programs/pyradio.nix | 8 +++++++- tests/modules/programs/pyradio/custom-stations.nix | 1 + tests/modules/programs/pyradio/expected-stations.csv | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/modules/programs/pyradio.nix b/modules/programs/pyradio.nix index b8ebdb44..db1a61c3 100644 --- a/modules/programs/pyradio.nix +++ b/modules/programs/pyradio.nix @@ -67,6 +67,12 @@ in description = "Encoding of the station's metadata block."; }; + iconUrl = mkOption { + type = str; + default = ""; + description = "URL of an icon to be shown in desktop notifications."; + }; + volume = mkOption { type = ints.between 0 130; default = 50; @@ -128,7 +134,7 @@ in (escapeCSV station.name) (escapeCSV station.url) station.encoding - "" + (escapeCSV station.iconUrl) "" "" "" diff --git a/tests/modules/programs/pyradio/custom-stations.nix b/tests/modules/programs/pyradio/custom-stations.nix index 0a0b4ec8..033c2e93 100644 --- a/tests/modules/programs/pyradio/custom-stations.nix +++ b/tests/modules/programs/pyradio/custom-stations.nix @@ -25,6 +25,7 @@ url = "https://somafm.com/defcon256.pls"; volume = 85; encoding = "utf-8"; + iconUrl = "https://somafm.com/img3/defcon400.png"; } ]; }; diff --git a/tests/modules/programs/pyradio/expected-stations.csv b/tests/modules/programs/pyradio/expected-stations.csv index 31f435b7..35388cd8 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,utf-8,,,,,85 +DEF CON Radio (SomaFM),https://somafm.com/defcon256.pls,utf-8,https://somafm.com/img3/defcon400.png,,,,85