mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-24 04:44:57 +02:00
Add socket event to remove download, fix clearInterval on stream loop
This commit is contained in:
parent
c30955f909
commit
9107620b3c
5 changed files with 26 additions and 3 deletions
|
@ -43,6 +43,10 @@ class Stream extends EventEmitter {
|
|||
return this.audiobook.id
|
||||
}
|
||||
|
||||
get audiobookTitle() {
|
||||
return this.audiobook ? this.audiobook.title : null
|
||||
}
|
||||
|
||||
get totalDuration() {
|
||||
return this.audiobook.totalDuration
|
||||
}
|
||||
|
@ -206,8 +210,9 @@ class Stream extends EventEmitter {
|
|||
if (!this.isTranscodeComplete) {
|
||||
this.checkFiles()
|
||||
} else {
|
||||
Logger.info(`[Stream] ${this.audiobookTitle} sending stream_ready`)
|
||||
this.socket.emit('stream_ready')
|
||||
clearTimeout(this.loop)
|
||||
clearInterval(this.loop)
|
||||
}
|
||||
}, 2000)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue