Skip to content

Commit

Permalink
Add Groove Salad, Spotify, Airplay as a default playing streams on fi…
Browse files Browse the repository at this point in the history
…rst startup
  • Loading branch information
SteveMicroNova committed Jan 29, 2025
1 parent 7149815 commit 293f359
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions amplipi/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
DEFAULT_CONFIG = { # This is the system state response that will come back from the amplipi box
"version": 1,
"sources": [ # this is an array of source objects, each has an id, name, type specifying whether source comes from a local (like RCA) or streaming input like pandora
{"id": 0, "name": "Input 1", "input": ""},
{"id": 1, "name": "Input 2", "input": ""},
{"id": 2, "name": "Input 3", "input": ""},
{"id": 3, "name": "Input 4", "input": ""},
{"id": 0, "name": "Output 1", "input": "stream=1000", "info": {"name": "Groove Salad - internetradio", "state": "playing", "type": "internetradio", "station": "Groove Salad [SomaFM]", "img_url": "https://somafm.com/img3/groovesalad-400.jpg", "supported_cmds": [ "play", "stop"]}},
{"id": 1, "name": "Output 2", "input": "stream=1001", "info": { "name": "Connect to SpotiPi 1 on Spotify Connect", "state": "playing", "type": "spotify", "img_url": "static/imgs/spotify.png", "supported_cmds": [ "play", "pause", "next", "prev" ] }},
{"id": 2, "name": "Output 3", "input": "stream=1003", "info": { "name": "Connect to AmpliPlay 2 on Airplay2", "state": "stopped", "type": "airplay", "img_url": "static/imgs/shairport.png", "supported_cmds": []}},
{"id": 3, "name": "Output 4", "input": ""},
],
# NOTE: streams and groups seem like they should be stored as dictionaries with integer keys
# this does not make sense because JSON only allows string based keys
Expand All @@ -34,6 +34,10 @@
{"id": RCAs[3], "name": "Input 4", "type": "rca", "index": 3, "browsable": False, "disabled": False},
{"id": 1000, "name": "Groove Salad", "type": "internetradio", "url": "http://ice6.somafm.com/groovesalad-32-aac",
"logo": "https://somafm.com/img3/groovesalad-400.jpg", "browsable": False, "disabled": False},
{"id": 1001, "name": "SpotiPi 1", "type": "spotify", "disabled": False, "browsable": False},
{"id": 1002, "name": "SpotiPi 2", "type": "spotify", "disabled": False, "browsable": False},
{"id": 1003, "name": "AmpliPlay 1", "type": "airplay", "disabled": False, "ap2": False, "browsable": False},
{"id": 1004, "name": "AmpliPlay 2", "type": "airplay", "disabled": False, "ap2": True, "browsable": False}
],
"zones": [ # this is an array of zones, array length depends on # of boxes connected
{"id": 0, "name": "Zone 1", "source_id": 0, "mute": True, "disabled": False,
Expand Down Expand Up @@ -70,15 +74,19 @@

STREAMER_CONFIG = { # This is the system state response that will come back from the amplipi box
"sources": [ # this is an array of source objects, each has an id, name, type specifying whether source comes from a local (like RCA) or streaming input like pandora
{"id": 0, "name": "Output 1", "input": ""},
{"id": 1, "name": "Output 2", "input": ""},
{"id": 2, "name": "Output 3", "input": ""},
{"id": 0, "name": "Output 1", "input": "stream=1000", "info": {"name": "Groove Salad - internetradio", "state": "playing", "type": "internetradio", "station": "Groove Salad [SomaFM]", "img_url": "https://somafm.com/img3/groovesalad-400.jpg", "supported_cmds": [ "play", "stop"]}},
{"id": 1, "name": "Output 2", "input": "stream=1001", "info": { "name": "Connect to SpotiPi 1 on Spotify Connect", "state": "playing", "type": "spotify", "img_url": "static/imgs/spotify.png", "supported_cmds": [ "play", "pause", "next", "prev" ] }},
{"id": 2, "name": "Output 3", "input": "stream=1003", "info": { "name": "Connect to AmpliPlay 2 on Airplay2", "state": "stopped", "type": "airplay", "img_url": "static/imgs/shairport.png", "supported_cmds": []}},
{"id": 3, "name": "Output 4", "input": ""},
],
"streams": [
{"id": AUX_STREAM_ID, "name": "Aux", "type": "aux", "browsable": False, "disabled": False},
{"id": 1000, "name": "Groove Salad", "type": "internetradio", "url": "http://ice6.somafm.com/groovesalad-32-aac",
"logo": "https://somafm.com/img3/groovesalad-400.jpg", "browsable": False, "disabled": False},
{"id": 1001, "name": "SpotiPi 1", "type": "spotify", "disabled": False, "browsable": False},
{"id": 1002, "name": "SpotiPi 2", "type": "spotify", "disabled": False, "browsable": False},
{"id": 1003, "name": "AmpliPlay 1", "type": "airplay", "disabled": False, "ap2": False, "browsable": False},
{"id": 1004, "name": "AmpliPlay 2", "type": "airplay", "disabled": False, "ap2": True, "browsable": False}
],
"zones": [ # this is an array of zones, array length depends on # of boxes connected
],
Expand Down

0 comments on commit 293f359

Please sign in to comment.