Update download logic

This commit is contained in:
2025-11-07 13:23:33 +11:00
parent 75335983f8
commit 0a4ead5462
5 changed files with 247 additions and 7 deletions
@@ -37,8 +37,8 @@ export default function SearchPage({ onPlayMusic }: SearchPageProps) {
})
const downloadMutation = useMutation({
mutationFn: ({ url, title }: { url: string; title: string; thumbnail?: string; artist?: string }) =>
downloadApi.downloadMusic({ url, title }),
mutationFn: ({ url, title, thumbnail, artist }: { url: string; title: string; thumbnail?: string; artist?: string }) =>
downloadApi.downloadMusic({ url, title, thumbnail, artist }),
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: ['download-status'] })
toast.success('Download started! Check Download Center for progress.')