From 47972a4eb5ba5835d90cc52b98624689a55fae1c Mon Sep 17 00:00:00 2001 From: Choco Date: Tue, 13 May 2025 16:53:07 +0800 Subject: [PATCH] Added peek next in loop type --- voicelink/queue.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/voicelink/queue.py b/voicelink/queue.py index 10beee0..cb5bd3b 100644 --- a/voicelink/queue.py +++ b/voicelink/queue.py @@ -38,6 +38,13 @@ class LoopTypeCycle: self.current = next(self._cycle) return self.current + def peek_next(self) -> LoopType: + temp_cycle = cycle(LoopType) + while next(temp_cycle) != self.current: + pass + + return next(temp_cycle) + def set_mode(self, value: LoopType) -> LoopType: while next(self._cycle) != value: pass