updated table when entries are deleted and fixed simkl watchlist
This commit is contained in:
@ -290,9 +290,51 @@
|
||||
|
||||
const deleteEntries = async () => {
|
||||
submitting.set(true)
|
||||
if (isAniListLoggedIn && currentAniListAnime.data.MediaList.mediaId !== 0) await AniListDeleteEntry(currentAniListAnime.data.MediaList.id)
|
||||
if (malLoggedIn && currentMalAnime.id !== 0) await DeleteMyAnimeListEntry(currentMalAnime.id)
|
||||
if (simklLoggedIn && currentSimklAnime.show.ids.simkl !== 0) await SimklSyncRemove(currentSimklAnime)
|
||||
if (isAniListLoggedIn && currentAniListAnime.data.MediaList.mediaId !== 0) {
|
||||
await AniListDeleteEntry(currentAniListAnime.data.MediaList.id)
|
||||
AddAnimeServiceToTable({
|
||||
id: currentAniListAnime.data.MediaList.mediaId,
|
||||
title,
|
||||
service: "AniList",
|
||||
progress: 0,
|
||||
status: "",
|
||||
startedAt: "",
|
||||
completedAt: "",
|
||||
score: 0,
|
||||
repeat: 0,
|
||||
notes: "",
|
||||
})
|
||||
}
|
||||
if (malLoggedIn && currentMalAnime.id !== 0) {
|
||||
await DeleteMyAnimeListEntry(currentMalAnime.id)
|
||||
AddAnimeServiceToTable({
|
||||
id: currentMalAnime.id,
|
||||
title: currentMalAnime.title,
|
||||
service: "MyAnimeList",
|
||||
progress: 0,
|
||||
status: "",
|
||||
startedAt: "",
|
||||
completedAt: "",
|
||||
score: 0,
|
||||
repeat: 0,
|
||||
notes: "",
|
||||
})
|
||||
}
|
||||
if (simklLoggedIn && currentSimklAnime.show.ids.simkl !== 0) {
|
||||
await SimklSyncRemove(currentSimklAnime)
|
||||
AddAnimeServiceToTable({
|
||||
id: currentSimklAnime.show.ids.simkl,
|
||||
title: currentSimklAnime.show.title,
|
||||
service: "Simkl",
|
||||
progress: 0,
|
||||
status: "",
|
||||
startedAt: "",
|
||||
completedAt: "",
|
||||
score: 0,
|
||||
repeat: 0,
|
||||
notes: "",
|
||||
})
|
||||
}
|
||||
submitting.set(false)
|
||||
submitSuccess.set(true)
|
||||
setTimeout(() => submitSuccess.set(false), 2000)
|
||||
|
Reference in New Issue
Block a user