From d46533a96cfb07588a146c915855337a1a6f22e8 Mon Sep 17 00:00:00 2001 From: markjfine Date: Thu, 8 Apr 2021 10:21:41 -0400 Subject: [PATCH] Tuning via Bookmarks Fixed a timing bug when re-tuning from a current station by double-clicking a bookmark, causing a whole host of problems. The bookmark click kills the current nrsc5 process then restarts with new freq and stream number. In some instances, the polling loop keeps plugging away and doesn't know the nrsc5 was killed. Adding a short 1 second delay between killing and re-tuning fixes the problem and allows processes the appropriate time to synch up. --- nrsc5-dui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nrsc5-dui.py b/nrsc5-dui.py index 7bfe15e..9266e4e 100644 --- a/nrsc5-dui.py +++ b/nrsc5-dui.py @@ -741,7 +741,7 @@ class NRSC5_DUI(object): # stop playback if playing if (self.playing): self.on_btnStop_clicked(None) - + time.sleep(1) # play bookmarked station self.on_btnPlay_clicked(None)