Description
After deleting a movie directly on Radarr, it becomes impossible to delete it on Seerr.
Version
3.2.0
Steps to Reproduce
- Delete a movie file on Radarr
- Open the movie details screen on Seerr
- Click to delete it
- Click on "Are you sure?"
Screenshots
Logs
Uncaught (in promise) AxiosError: Request failed with status code 404
Platform
desktop
Database
SQLite (default)
Device
ASUS Vivobook
Operating System
Pop!_OS 22.04 LTS
Browser
Mozilla Firefox 149.0
Additional Context
I've read some of the code and it seems that this function is the responsible:
const deleteMediaFile = async (is4k = false) => {
if (data.mediaInfo) {
await axios.delete(
`/api/v1/media/${data.mediaInfo.id}/file?is4k=${is4k}`
);
await axios.delete(`/api/v1/media/${data.mediaInfo.id}`);
revalidate();
onClose();
}
};
As axios throws an error when the DELETE request returns with a status code of 404, it simply never marks the movie as deleted. Since a 404 on a DELETE means the resource is already gone, it should be treated as a success. I'd suggest catching 404s and continuing with revalidate() and onClose() as normal, since the desired end state (resource no longer exists) is already achieved.
Search Existing Issues
Code of Conduct
Description
After deleting a movie directly on Radarr, it becomes impossible to delete it on Seerr.
Version
3.2.0
Steps to Reproduce
Screenshots
Logs
Platform
desktop
Database
SQLite (default)
Device
ASUS Vivobook
Operating System
Pop!_OS 22.04 LTS
Browser
Mozilla Firefox 149.0
Additional Context
I've read some of the code and it seems that this function is the responsible:
As axios throws an error when the DELETE request returns with a status code of 404, it simply never marks the movie as deleted. Since a 404 on a DELETE means the resource is already gone, it should be treated as a success. I'd suggest catching 404s and continuing with revalidate() and onClose() as normal, since the desired end state (resource no longer exists) is already achieved.
Search Existing Issues
Code of Conduct