mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-25 16:18:54 +01:00
Remove test stream, add prod script
This commit is contained in:
parent
f54d48270e
commit
2f6417dec2
@ -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",
|
||||
|
@ -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 }) {
|
||||
|
Loading…
Reference in New Issue
Block a user