Adds ability to rename favorite

This commit is contained in:
2025-03-05 00:10:23 -08:00
parent 0a86dbed49
commit 2b533cf1db
6 changed files with 187 additions and 20 deletions

View File

@@ -186,6 +186,10 @@ export class MediaPlayer {
return this.favoritesStore.clearFavorites();
}
public async updateFavoriteTitle(filename: string, title: string) {
return this.favoritesStore.updateFavoriteTitle(filename, title);
}
private async loadFile(url: string, mode: string) {
this.modify(UserEvent.PlaylistUpdate, () => this.writeCommand("loadfile", [url, mode]));
@@ -257,7 +261,7 @@ export class MediaPlayer {
}
private handleEvent(event: string, data: any) {
console.log("Event [" + event + "]: " + JSON.stringify(data, null, 2));
console.log("Event [" + event + "]: ", data);
// Notify all subscribers
this.eventSubscribers.forEach(subscriber => {
@@ -294,4 +298,4 @@ export class MediaPlayer {
}
}
}
}
}