From 729279ea7819a1168240218faa7d7ef1d30437e2 Mon Sep 17 00:00:00 2001 From: James Magahern Date: Wed, 5 Mar 2025 00:24:19 -0800 Subject: [PATCH] favorites: should post change events here --- backend/src/MediaPlayer.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/src/MediaPlayer.ts b/backend/src/MediaPlayer.ts index 7ae682b..f6d757e 100644 --- a/backend/src/MediaPlayer.ts +++ b/backend/src/MediaPlayer.ts @@ -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) {