added genre cache

This commit is contained in:
2026-02-25 10:16:43 -05:00
parent 8f1ee25053
commit 5689c1be42
8 changed files with 93 additions and 31 deletions
@@ -55,6 +55,10 @@ export class LibraryController implements ReactiveController {
return libraryStore.getArtists();
}
async getGenres(): Promise<library.GenreWithCount[]> {
return libraryStore.getGenres();
}
async getAlbumsByArtist(
artistID: number,
): Promise<library.Album[]> {
@@ -81,6 +85,10 @@ export class LibraryController implements ReactiveController {
return libraryStore.getCachedArtists();
}
get cachedGenres(): library.GenreWithCount[] | null {
return libraryStore.getCachedGenres();
}
get tracksLoading(): boolean {
return libraryStore.isTracksLoading();
}
@@ -93,6 +101,10 @@ export class LibraryController implements ReactiveController {
return libraryStore.isArtistsLoading();
}
get genresLoading(): boolean {
return libraryStore.isGenresLoading();
}
// ===================================================================
// SCROLL POSITION
// ===================================================================