Smarter/more granular event handling
This commit is contained in:
@@ -46,6 +46,15 @@ export interface SearchResponse {
|
||||
results: SearchResult[];
|
||||
}
|
||||
|
||||
export enum ServerEvent {
|
||||
PlaylistUpdate = "playlist_update",
|
||||
NowPlayingUpdate = "now_playing_update",
|
||||
VolumeUpdate = "volume_update",
|
||||
FavoritesUpdate = "favorites_update",
|
||||
MetadataUpdate = "metadata_update",
|
||||
MPDUpdate = "mpd_update",
|
||||
}
|
||||
|
||||
export const API = {
|
||||
async getPlaylist(): Promise<PlaylistItem[]> {
|
||||
const response = await fetch('/api/playlist');
|
||||
|
||||
Reference in New Issue
Block a user