mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-17 00:08:55 +01:00
Remove test stream, add prod script
This commit is contained in:
parent
ea61400329
commit
a63d76985c
@ -5,7 +5,8 @@
|
|||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "node index.js",
|
"dev": "node index.js",
|
||||||
"start": "node index.js"
|
"start": "node index.js",
|
||||||
|
"prod": "NODE_ENV=production node index.js"
|
||||||
},
|
},
|
||||||
"author": "advplyr",
|
"author": "advplyr",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const Stream = require('./objects/Stream')
|
const Stream = require('./objects/Stream')
|
||||||
const StreamTest = require('./test/StreamTest')
|
// const StreamTest = require('./test/StreamTest')
|
||||||
const Logger = require('./Logger')
|
const Logger = require('./Logger')
|
||||||
const fs = require('fs-extra')
|
const fs = require('fs-extra')
|
||||||
const Path = require('path')
|
const Path = require('path')
|
||||||
@ -104,19 +104,19 @@ class StreamManager {
|
|||||||
|
|
||||||
async openTestStream(streamPath, audiobookId) {
|
async openTestStream(streamPath, audiobookId) {
|
||||||
Logger.info('Open Stream Test Request', audiobookId)
|
Logger.info('Open Stream Test Request', audiobookId)
|
||||||
var audiobook = this.audiobooks.find(ab => ab.id === audiobookId)
|
// var audiobook = this.audiobooks.find(ab => ab.id === audiobookId)
|
||||||
var stream = new StreamTest(streamPath, audiobook)
|
// var stream = new StreamTest(streamPath, audiobook)
|
||||||
|
|
||||||
stream.on('closed', () => {
|
// stream.on('closed', () => {
|
||||||
console.log('Stream closed')
|
// console.log('Stream closed')
|
||||||
})
|
// })
|
||||||
|
|
||||||
var playlistUri = await stream.generatePlaylist()
|
// var playlistUri = await stream.generatePlaylist()
|
||||||
stream.start()
|
// stream.start()
|
||||||
|
|
||||||
Logger.info('Stream Playlist', playlistUri)
|
// Logger.info('Stream Playlist', playlistUri)
|
||||||
Logger.info('Test Stream Opened for audiobook', audiobook.title, 'with streamId', stream.id)
|
// Logger.info('Test Stream Opened for audiobook', audiobook.title, 'with streamId', stream.id)
|
||||||
return playlistUri
|
// return playlistUri
|
||||||
}
|
}
|
||||||
|
|
||||||
streamUpdate(socket, { currentTime, streamId }) {
|
streamUpdate(socket, { currentTime, streamId }) {
|
||||||
|
Loading…
Reference in New Issue
Block a user