When stopping a stream, execute writeTextInfoBlock after checking the existence of the stream (MonitorStream.js)

pull/4709/head
IgorA100 2026-03-14 16:07:50 +03:00 committed by GitHub
parent d43dd30155
commit 94b1ead0f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 5 deletions

View File

@ -728,11 +728,6 @@ function MonitorStream(monitorData) {
};
this.stop = function() {
if (-1 !== this.activePlayer.indexOf('zms')) {
this.writeTextInfoBlock("Stopped", {showImg: false});
} else {
this.writeTextInfoBlock("Stopped");
}
manageEventListener.removeEventListener(this.handlerEventListener['killStream']);
manageEventListener.removeEventListener(this.handlerEventListener['playStream']);
if (manageEventListener.removeEventListener(this.handlerEventListener['volumechange']) == this.handlerEventListener['volumechange']) this.handlerEventListener['volumechange'] = null;
@ -747,6 +742,11 @@ function MonitorStream(monitorData) {
console.warn(`! ${dateTimeToISOLocal(new Date())} Stream for ID=${this.id} has already stopped.`);
return;
}
if (-1 !== this.activePlayer.indexOf('zms')) {
this.writeTextInfoBlock("Stopped", {showImg: false});
} else {
this.writeTextInfoBlock("Stopped");
}
console.debug(`! ${dateTimeToISOLocal(new Date())} Stream for ID=${this.id} STOPPING`);
this.statusCmdTimer = clearInterval(this.statusCmdTimer);
this.streamCmdTimer = clearInterval(this.streamCmdTimer);