Added todo
This commit is contained in:
@@ -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()
|
||||||
|
@@ -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))
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user