pyradio: add per-station player profile option

This commit is contained in:
magicquark 2026-02-26 05:04:31 +00:00 committed by Austin Horstman
parent 358bafaf95
commit 56c1ceb3c8
3 changed files with 9 additions and 2 deletions

View file

@ -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}")

View file

@ -28,6 +28,7 @@
encoding = "utf-8";
iconUrl = "https://somafm.com/img3/defcon400.png";
forceHttp = true;
profile = "loud-mode";
}
];
};

View file

@ -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

1 DEF CON Radio (SomaFM) https://somafm.com/defcon256.pls 0 50
2 DEF CON Radio, SomaFM https://somafm.com/defcon256.pls 0 50
3 DEF CON Radio on "SomaFM" https://somafm.com/defcon256.pls 0 50
4 DEF CON Radio on "SomaFM" https://somafm.com/defcon256.pls 0 50
5 DEF CON Radio (SomaFM) https://somafm.com/defcon256.pls utf-8 https://somafm.com/img3/defcon400.png loud-mode 10@128 1 85