Use new public JSON streams endpoint

This commit is contained in:
Max Goodhart
2020-06-22 23:58:53 -07:00
parent 2517ec055e
commit 5b699f7c31
6 changed files with 44 additions and 274 deletions

View File

@@ -25,7 +25,7 @@ function Overlay({ views, streams, customStreams }) {
{activeViews.map((viewState) => {
const { content, pos } = viewState.context
const data = [...streams, ...customStreams].find(
(d) => content.url === d.Link,
(d) => content.url === d.link,
)
const isListening = viewState.matches(
'displaying.running.audio.listening',
@@ -39,11 +39,11 @@ function Overlay({ views, streams, customStreams }) {
<StreamTitle isListening={isListening}>
<StreamIcon url={content.url} />
<span>
{data.hasOwnProperty('Label') ? (
data.Label
{data.hasOwnProperty('label') ? (
data.label
) : (
<>
{data.Source} &ndash; {data.City} {data.State}
{data.source} &ndash; {data.city} {data.state}
</>
)}
</span>