From 1026f936be5d9b46e713080f48cd886ddffee5ba Mon Sep 17 00:00:00 2001 From: Sumner Evans Date: Thu, 29 Aug 2019 23:15:47 -0600 Subject: [PATCH] Added todo --- libremsonic/cache_manager.py | 5 +++-- libremsonic/ui/albums.py | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libremsonic/cache_manager.py b/libremsonic/cache_manager.py index 777682f..196263a 100644 --- a/libremsonic/cache_manager.py +++ b/libremsonic/cache_manager.py @@ -585,10 +585,11 @@ class CacheManager(metaclass=Singleton): return (str(abs_path), False) - def get_genres(self, + def get_genres( + self, before_download: Callable[[], None] = lambda: None, force: bool = False, - ) -> Future: + ) -> Future: def do_get_genres() -> List[Genre]: if not self.cache['genres'] or force: before_download() diff --git a/libremsonic/ui/albums.py b/libremsonic/ui/albums.py index ac8a423..c4b1815 100644 --- a/libremsonic/ui/albums.py +++ b/libremsonic/ui/albums.py @@ -114,6 +114,11 @@ class AlbumsPanel(Gtk.Box): def populate_genre_combo(self): def get_genres_done(f): model = self.genre_combo.get_model() + + # TODO enabling this infinite loops the program, I think due to the + # fact that it triggers a genre change event. Fix this with some + # locks. + # model.clear() for genre in (f.result() or []): model.append((genre.value, genre.value))