mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
streams: render out for transistor webradio app
This commit is contained in:
@@ -388,6 +388,7 @@
|
|||||||
timer = pkgs.callPackage packages/timer.nix {};
|
timer = pkgs.callPackage packages/timer.nix {};
|
||||||
tocharian-font = pkgs.callPackage packages/tocharian-font.nix {};
|
tocharian-font = pkgs.callPackage packages/tocharian-font.nix {};
|
||||||
trans = pkgs.callPackage packages/trans.nix {};
|
trans = pkgs.callPackage packages/trans.nix {};
|
||||||
|
transistor-streams = pkgs.callPackage packages/transistor-streams.nix {di-fm-key = "";};
|
||||||
ttspaste = pkgs.callPackage packages/ttspaste.nix {};
|
ttspaste = pkgs.callPackage packages/ttspaste.nix {};
|
||||||
unicodmenu = pkgs.callPackage packages/unicodmenu.nix {};
|
unicodmenu = pkgs.callPackage packages/unicodmenu.nix {};
|
||||||
emailmenu = pkgs.callPackage packages/emailmenu.nix {};
|
emailmenu = pkgs.callPackage packages/emailmenu.nix {};
|
||||||
|
|||||||
43
packages/transistor-streams.nix
Normal file
43
packages/transistor-streams.nix
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
{ runCommand, di-fm-key, lib, writeText, zip }:
|
||||||
|
let
|
||||||
|
streams = import ../lib/streams.nix {inherit di-fm-key;};
|
||||||
|
object = rec {
|
||||||
|
modificationDate = "6/25/24 09:09 AM";
|
||||||
|
version = 0;
|
||||||
|
stations = map (stream: {
|
||||||
|
bitrate = 0;
|
||||||
|
codec = "";
|
||||||
|
homepage = "";
|
||||||
|
image = if stream ? "logo" then stream.logo else "";
|
||||||
|
imageColor = -1;
|
||||||
|
imageManuallySet = stream ? "logo";
|
||||||
|
isPlaying = false;
|
||||||
|
modificationDate = modificationDate;
|
||||||
|
name = stream.station;
|
||||||
|
nameManuallySet = true;
|
||||||
|
radioBrowserChangeUuid = "";
|
||||||
|
radioBrowserStationUuid = "";
|
||||||
|
remoteImageLocation = "";
|
||||||
|
remoteStationLocation = "";
|
||||||
|
smallImage = "";
|
||||||
|
starred = false;
|
||||||
|
stream = 0;
|
||||||
|
streamContent = "audio/mpeg";
|
||||||
|
streamUris = [stream.stream];
|
||||||
|
uuid = stream.station; # hacky hack
|
||||||
|
}) streams;
|
||||||
|
};
|
||||||
|
json = writeText "collection.json" (builtins.toJSON object);
|
||||||
|
m3u = writeText "collection.m3u" ''
|
||||||
|
#EXTM3U
|
||||||
|
${lib.concatMapStringsSep "\n" (stream: ''
|
||||||
|
#EXTIF:-1,${stream.station}
|
||||||
|
${stream.stream}
|
||||||
|
'') streams}
|
||||||
|
'';
|
||||||
|
in runCommand "transistor.zip" {} ''
|
||||||
|
mkdir collection
|
||||||
|
cp ${json} collection/collection.json
|
||||||
|
cp ${m3u} collection/collection.m3u
|
||||||
|
${zip}/bin/zip -r $out collection/
|
||||||
|
''
|
||||||
Reference in New Issue
Block a user