fixed library scan using event listeners instead of store pattern

This commit is contained in:
2026-02-24 15:04:35 -05:00
parent 1221a403cf
commit d764fefb10
14 changed files with 612 additions and 136 deletions
+13
View File
@@ -251,6 +251,19 @@ class LibraryStore {
this.artists = null;
this.scrollPositions = { tracks: 0, albums: 0, artists: 0, genres: 0 };
this.notify();
this.eagerRefetch();
}
/**
* Re-fetches all data after cache invalidation so that
* controller subscribers receive fresh data on the next
* requestUpdate() cycle without needing their own
* LibraryScanComplete listener.
*/
private eagerRefetch(): void {
void this.getTracks();
void this.getAlbums();
void this.getArtists();
}
// ===================================================================
+1
View File
@@ -123,6 +123,7 @@ class PlaylistStore {
this.playlists = null;
this.scrollPosition = 0;
this.notify();
void this.getPlaylists();
}
// ===================================================================