From 24ffed7584cf52e607e0b8a8e84cbc4342f5aad0 Mon Sep 17 00:00:00 2001 From: Robert Goldmann <deadlocker@gmx.de> Date: Fri, 26 Jan 2024 23:05:47 +0100 Subject: [PATCH] SpotifyRecorder: increase tolerance --- SpotifyRecorder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SpotifyRecorder.py b/SpotifyRecorder.py index 058b6b4..77ea0e6 100644 --- a/SpotifyRecorder.py +++ b/SpotifyRecorder.py @@ -225,7 +225,7 @@ class SpotifyRecorder: waitDuration = int(time.time() - startTime) waitDuration += timeWaitedForPlaying - if waitDuration < trackDurationInSeconds - self._WAIT_TIME_TRACK_PLAYING_SHORT_IN_S: + if waitDuration < trackDurationInSeconds - self._WAIT_TIME_TRACK_PLAYING_SHORT_IN_S * 2: raise RuntimeError( f'Track finished too early (waited: {waitDuration}s, expected: {trackDurationInSeconds}s)') if waitDuration > trackDurationInSeconds + self._WAIT_TIME_TRACK_PLAYING_SHORT_IN_S * 3: -- GitLab