mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-04-11 19:41:56 +01:00
feat: cache and download music
This commit is contained in:
@@ -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"));
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user