Skip to content

Commit 96d41fc

Browse files
committed
fix internet radio search on IOS app
1 parent 4536e18 commit 96d41fc

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# AmpliPi Software Releases
22

3+
## Upcoming Release
4+
* Web App
5+
* Fix internet radio search on IOS app
6+
37
## 0.4.2
48
* Streams
59
* Internet radio can now play playlists from the `pls`, `m3u8`, and `m3u` formats.

web/src/pages/Settings/Streams/StreamModal/StreamModal.jsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ const InternetRadioSearch = ({ onChange }) => {
117117
return;
118118
}
119119

120-
fetch(`http://${host}/json/stations/search`, {
120+
fetch(`https://${host}/json/stations/search`, {
121121
method: "POST",
122122
headers: { "Content-Type": "application/json" },
123123
body: JSON.stringify({ name: name }),
@@ -130,7 +130,9 @@ const InternetRadioSearch = ({ onChange }) => {
130130

131131
return (
132132
React.useEffect(() => {
133-
fetch("http://all.api.radio-browser.info/json/servers").then((res) =>
133+
// pinned this to at1 since it appears to be the main server and the
134+
// HTTPS cert isn't valid for all.api.radio-browser.info
135+
fetch("https://at1.api.radio-browser.info/json/servers").then((res) =>
134136
res.json().then(async (s) => {
135137
for (const i of s) {
136138
const res = await fetch("https://" + i.name);
@@ -175,7 +177,7 @@ const InternetRadioSearch = ({ onChange }) => {
175177
}}
176178
>
177179
<ListItemAvatar>
178-
<Avatar variant="rounded"
180+
<Avatar variant="rounded"
179181
src={s.favicon ? s.favicon : null}
180182
alt={s.name}
181183
sx={{ height: '2rem' }}

0 commit comments

Comments
 (0)