favorites: should post change events here

This commit is contained in:
2025-03-05 00:24:19 -08:00
parent 9303c5acfe
commit 729279ea78

View File

@@ -175,19 +175,19 @@ export class MediaPlayer {
}
public async addFavorite(filename: string) {
return this.favoritesStore.addFavorite(filename);
return this.modify(UserEvent.FavoritesUpdate, () => this.favoritesStore.addFavorite(filename));
}
public async removeFavorite(filename: string) {
return this.favoritesStore.removeFavorite(filename);
return this.modify(UserEvent.FavoritesUpdate, () => this.favoritesStore.removeFavorite(filename));
}
public async clearFavorites() {
return this.favoritesStore.clearFavorites();
return this.modify(UserEvent.FavoritesUpdate, () => this.favoritesStore.clearFavorites());
}
public async updateFavoriteTitle(filename: string, title: string) {
return this.favoritesStore.updateFavoriteTitle(filename, title);
return this.modify(UserEvent.FavoritesUpdate, () => this.favoritesStore.updateFavoriteTitle(filename, title));
}
private async loadFile(url: string, mode: string) {