mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-17 13:23:35 +00:00
fix: stop log incorrectly (#1185)
* fix: stop log incorrectly * prevent start if already playing
This commit is contained in:
committed by
GitHub
parent
db5fbd8019
commit
e20cd87673
@@ -512,8 +512,8 @@ class RuntimeService {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.eventTimer?.pause();
|
this.eventTimer?.pause();
|
||||||
const newState = state.timer.playback;
|
const newState = runtimeState.getState();
|
||||||
logger.info(LogOrigin.Playback, `Play Mode ${newState.toUpperCase()}`);
|
logger.info(LogOrigin.Playback, `Play Mode ${newState.timer.playback.toUpperCase()}`);
|
||||||
process.nextTick(() => {
|
process.nextTick(() => {
|
||||||
integrationService.dispatch(TimerLifeCycle.onPause);
|
integrationService.dispatch(TimerLifeCycle.onPause);
|
||||||
});
|
});
|
||||||
@@ -531,8 +531,8 @@ class RuntimeService {
|
|||||||
}
|
}
|
||||||
const didStop = this.eventTimer?.stop();
|
const didStop = this.eventTimer?.stop();
|
||||||
if (didStop) {
|
if (didStop) {
|
||||||
const newState = state.timer.playback;
|
const newState = runtimeState.getState();
|
||||||
logger.info(LogOrigin.Playback, `Play Mode ${newState.toUpperCase()}`);
|
logger.info(LogOrigin.Playback, `Play Mode ${newState.timer.playback.toUpperCase()}`);
|
||||||
process.nextTick(() => {
|
process.nextTick(() => {
|
||||||
integrationService.dispatch(TimerLifeCycle.onStop);
|
integrationService.dispatch(TimerLifeCycle.onStop);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { Playback, TimerPhase } from 'ontime-types';
|
|||||||
*/
|
*/
|
||||||
export function validatePlayback(currentPlayback: Playback, timerPhase: TimerPhase) {
|
export function validatePlayback(currentPlayback: Playback, timerPhase: TimerPhase) {
|
||||||
return {
|
return {
|
||||||
start: currentPlayback !== Playback.Stop,
|
start: currentPlayback !== Playback.Stop && currentPlayback !== Playback.Play,
|
||||||
pause: currentPlayback === Playback.Play,
|
pause: currentPlayback === Playback.Play,
|
||||||
roll: currentPlayback !== Playback.Roll && timerPhase !== TimerPhase.Overtime,
|
roll: currentPlayback !== Playback.Roll && timerPhase !== TimerPhase.Overtime,
|
||||||
stop: currentPlayback !== Playback.Stop,
|
stop: currentPlayback !== Playback.Stop,
|
||||||
|
|||||||
Reference in New Issue
Block a user