mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-11-18 06:38:31 +01:00
Add socket event to remove download, fix clearInterval on stream loop
This commit is contained in:
1 parent
80f90907d4
commit
11f4caffa8
5 files changed
+26
-3
No files matched your search
@@ -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)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user