From f1e35214e2a44f718708229daac52fd88941df15 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Hamal=20Dvo=C5=99=C3=A1k?= <mordae@anilinux.org>
Date: Tue, 11 Mar 2025 20:19:18 +0100
Subject: [PATCH] Fix toggle watched status

---
 lazy_player/main_window.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lazy_player/main_window.py b/lazy_player/main_window.py
index 25b769a..f1f9d37 100644
--- a/lazy_player/main_window.py
+++ b/lazy_player/main_window.py
@@ -183,7 +183,7 @@ class MainWindow(Gtk.ApplicationWindow, Watcher):
         label = cast(Gtk.Label, box.get_last_child())
         item = cast(FileItem, list_item.get_item())
 
-        def update_icon(*args: object) -> None:
+        def update_icon():
             if item.file_type == FileType.DIRECTORY:
                 icon.set_from_icon_name("folder-symbolic")
                 icon.set_css_classes(["file-icon"])
@@ -202,8 +202,7 @@ class MainWindow(Gtk.ApplicationWindow, Watcher):
                     icon.set_css_classes(["file-icon", "in-progress"])
 
         label.set_text(item.name)
-        item.connect("notify::saved-position", update_icon)
-        item.connect("notify::saved-duration", update_icon)
+        item.watch(update_icon)
         update_icon()
 
     def _on_activate(self, widget: Gtk.ListView, index: int):