Skip to content

Commit

Permalink
fix more lock warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Taiko2k committed Dec 3, 2024
1 parent cea5f08 commit 1d01c5f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/tauon/t_modules/t_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5354,7 +5354,8 @@ def notify_update_fire(self) -> None:
def notify_update(self, mpris: bool = True) -> None:
tauon.tray_releases += 1
try:
tauon.tray_lock.release()
if tauon.tray_lock.locked():
tauon.tray_lock.release()
except RuntimeError as e:
if str(e) == "release unlocked lock":
logging.error("RuntimeError: Attempted to release already unlocked tray_lock")
Expand Down Expand Up @@ -48595,7 +48596,8 @@ def drop_file(target):
time.sleep(2)

try:
tm.player_lock.release()
if tm.player_lock.locked():
tm.player_lock.release()
except RuntimeError as e:
if str(e) == "release unlocked lock":
logging.error("RuntimeError: Attempted to release already unlocked player_lock")
Expand Down

0 comments on commit 1d01c5f

Please sign in to comment.