Added todo

This commit is contained in:
Sumner Evans
2019-08-29 23:15:47 -06:00
parent 6f9453f377
commit 1026f936be
2 changed files with 8 additions and 2 deletions

View File

@@ -585,10 +585,11 @@ class CacheManager(metaclass=Singleton):
return (str(abs_path), False) return (str(abs_path), False)
def get_genres(self, def get_genres(
self,
before_download: Callable[[], None] = lambda: None, before_download: Callable[[], None] = lambda: None,
force: bool = False, force: bool = False,
) -> Future: ) -> Future:
def do_get_genres() -> List[Genre]: def do_get_genres() -> List[Genre]:
if not self.cache['genres'] or force: if not self.cache['genres'] or force:
before_download() before_download()

View File

@@ -114,6 +114,11 @@ class AlbumsPanel(Gtk.Box):
def populate_genre_combo(self): def populate_genre_combo(self):
def get_genres_done(f): def get_genres_done(f):
model = self.genre_combo.get_model() 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 []): for genre in (f.result() or []):
model.append((genre.value, genre.value)) model.append((genre.value, genre.value))