diff --git a/package.json b/package.json index baec0e15..c5152ef3 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "main": "index.js", "scripts": { "dev": "node index.js", - "start": "node index.js" + "start": "node index.js", + "prod": "NODE_ENV=production node index.js" }, "author": "advplyr", "license": "ISC", diff --git a/server/StreamManager.js b/server/StreamManager.js index 5b8a32d9..6170321f 100644 --- a/server/StreamManager.js +++ b/server/StreamManager.js @@ -1,5 +1,5 @@ const Stream = require('./objects/Stream') -const StreamTest = require('./test/StreamTest') +// const StreamTest = require('./test/StreamTest') const Logger = require('./Logger') const fs = require('fs-extra') const Path = require('path') @@ -104,19 +104,19 @@ class StreamManager { async openTestStream(streamPath, audiobookId) { Logger.info('Open Stream Test Request', audiobookId) - var audiobook = this.audiobooks.find(ab => ab.id === audiobookId) - var stream = new StreamTest(streamPath, audiobook) + // var audiobook = this.audiobooks.find(ab => ab.id === audiobookId) + // var stream = new StreamTest(streamPath, audiobook) - stream.on('closed', () => { - console.log('Stream closed') - }) + // stream.on('closed', () => { + // console.log('Stream closed') + // }) - var playlistUri = await stream.generatePlaylist() - stream.start() + // var playlistUri = await stream.generatePlaylist() + // stream.start() - Logger.info('Stream Playlist', playlistUri) - Logger.info('Test Stream Opened for audiobook', audiobook.title, 'with streamId', stream.id) - return playlistUri + // Logger.info('Stream Playlist', playlistUri) + // Logger.info('Test Stream Opened for audiobook', audiobook.title, 'with streamId', stream.id) + // return playlistUri } streamUpdate(socket, { currentTime, streamId }) {