feat: cache and download music

This commit is contained in:
Fredrik Burmester
2026-01-04 12:50:41 +01:00
parent b1da9f8777
commit ab3465aec5
22 changed files with 1616 additions and 110 deletions

View File

@@ -27,10 +27,12 @@ export const useCreatePlaylist = () => {
}
const response = await getPlaylistsApi(api).createPlaylist({
name,
ids: trackIds,
userId: user.Id,
mediaType: "Audio",
createPlaylistDto: {
Name: name,
Ids: trackIds,
UserId: user.Id,
MediaType: "Audio",
},
});
return response.data.Id;
@@ -38,6 +40,7 @@ export const useCreatePlaylist = () => {
onSuccess: () => {
queryClient.invalidateQueries({
queryKey: ["music-playlists"],
refetchType: "all",
});
toast.success(t("music.playlists.created"));
},