Stop filtering out offline/unknown streams from list

This commit is contained in:
Max Goodhart
2020-10-08 23:40:33 -07:00
parent 1e25b0622c
commit 4ee2f3ad2a
2 changed files with 40 additions and 24 deletions

View File

@@ -8,13 +8,6 @@ import chokidar from 'chokidar'
const sleep = promisify(setTimeout)
function filterLive(data) {
return data.filter(
({ kind, status }) =>
(kind && kind !== 'video') || status === 'Live' || status === 'Unknown',
)
}
export async function* pollDataURL(url, intervalSecs) {
const refreshInterval = intervalSecs * 1000
let lastData = []
@@ -31,7 +24,7 @@ export async function* pollDataURL(url, intervalSecs) {
if (!data.length && lastData.length) {
console.warn('using cached stream data')
} else {
yield filterLive(data)
yield data
lastData = data
}