mirror of
https://github.com/streamwall/streamwall.git
synced 2026-01-27 07:22:50 -05:00
Use new public JSON streams endpoint
This commit is contained in:
@@ -3,7 +3,7 @@ import yargs from 'yargs'
|
||||
import { app, shell, session, BrowserWindow } from 'electron'
|
||||
|
||||
import { ensureValidURL } from '../util'
|
||||
import { pollPublicData, pollSpreadsheetData, StreamIDGenerator } from './data'
|
||||
import { pollPublicData, StreamIDGenerator } from './data'
|
||||
import StreamWindow from './StreamWindow'
|
||||
import initWebServer from './server'
|
||||
|
||||
@@ -12,17 +12,6 @@ async function main() {
|
||||
.config('config', (configPath) => {
|
||||
return JSON.parse(fs.readFileSync(configPath, 'utf-8'))
|
||||
})
|
||||
.group(['gs-creds', 'gs-id', 'gs-tab'], 'Spreadsheet Configuration')
|
||||
.option('gs-creds', {
|
||||
describe: 'credentials file for Google Spreadsheet access',
|
||||
implies: ['gs-id', 'gs-tab'],
|
||||
})
|
||||
.option('gs-id', {
|
||||
describe: 'Google Spreadsheet id',
|
||||
})
|
||||
.option('gs-tab', {
|
||||
describe: 'Google Spreadsheet tab name',
|
||||
})
|
||||
.group(
|
||||
['webserver', 'cert-dir', 'cert-email', 'hostname', 'port'],
|
||||
'Web Server Configuration',
|
||||
@@ -151,14 +140,7 @@ async function main() {
|
||||
broadcastState(clientState)
|
||||
})
|
||||
|
||||
let dataGen
|
||||
if (argv.gsCreds) {
|
||||
dataGen = pollSpreadsheetData(argv.gsCreds, argv.gsId, argv.gsTab)
|
||||
} else {
|
||||
dataGen = pollPublicData()
|
||||
}
|
||||
|
||||
for await (const rawStreams of dataGen) {
|
||||
for await (const rawStreams of pollPublicData()) {
|
||||
const streams = idGen.process(rawStreams)
|
||||
clientState.streams = streams
|
||||
streamWindow.send('state', clientState)
|
||||
|
||||
Reference in New Issue
Block a user