mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-04 15:08:01 +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;
|
||||
}
|
||||
this.eventTimer?.pause();
|
||||
const newState = state.timer.playback;
|
||||
logger.info(LogOrigin.Playback, `Play Mode ${newState.toUpperCase()}`);
|
||||
const newState = runtimeState.getState();
|
||||
logger.info(LogOrigin.Playback, `Play Mode ${newState.timer.playback.toUpperCase()}`);
|
||||
process.nextTick(() => {
|
||||
integrationService.dispatch(TimerLifeCycle.onPause);
|
||||
});
|
||||
@@ -531,8 +531,8 @@ class RuntimeService {
|
||||
}
|
||||
const didStop = this.eventTimer?.stop();
|
||||
if (didStop) {
|
||||
const newState = state.timer.playback;
|
||||
logger.info(LogOrigin.Playback, `Play Mode ${newState.toUpperCase()}`);
|
||||
const newState = runtimeState.getState();
|
||||
logger.info(LogOrigin.Playback, `Play Mode ${newState.timer.playback.toUpperCase()}`);
|
||||
process.nextTick(() => {
|
||||
integrationService.dispatch(TimerLifeCycle.onStop);
|
||||
});
|
||||
|
||||
@@ -5,7 +5,7 @@ import { Playback, TimerPhase } from 'ontime-types';
|
||||
*/
|
||||
export function validatePlayback(currentPlayback: Playback, timerPhase: TimerPhase) {
|
||||
return {
|
||||
start: currentPlayback !== Playback.Stop,
|
||||
start: currentPlayback !== Playback.Stop && currentPlayback !== Playback.Play,
|
||||
pause: currentPlayback === Playback.Play,
|
||||
roll: currentPlayback !== Playback.Roll && timerPhase !== TimerPhase.Overtime,
|
||||
stop: currentPlayback !== Playback.Stop,
|
||||
|
||||
Reference in New Issue
Block a user