Change:Main dir paths moved to global vars, server settings stored in globals vars

This commit is contained in:
advplyr 2022-02-27 13:47:52 -06:00
parent eb109c398f
commit aa50cc2d81
14 changed files with 84 additions and 95 deletions

View file

@ -4,12 +4,11 @@ const fs = require('fs-extra')
const Logger = require('./Logger')
class HlsController {
constructor(db, auth, streamManager, emitter, StreamsPath) {
constructor(db, auth, streamManager, emitter) {
this.db = db
this.auth = auth
this.streamManager = streamManager
this.emitter = emitter
this.StreamsPath = StreamsPath
this.router = express()
this.init()
@ -27,7 +26,7 @@ class HlsController {
async streamFileRequest(req, res) {
var streamId = req.params.stream
var fullFilePath = Path.join(this.StreamsPath, streamId, req.params.file)
var fullFilePath = Path.join(this.streamManager.StreamsPath, streamId, req.params.file)
// development test stream - ignore
if (streamId === 'test') {