How to stop "File was deleted to import an upgrade"?

Hey folks,

I just switched to using Sonarr earlier this week and it’s working well so far with a few exceptions.

It’s deleting already downloaded episodes with the message in the subject, but NOT actually downloading the higher quality version. (SABnzdb history doesn’t list any attempts). How can I get Sonarr to either:

A) Don’t download higher quality episodes at all once at least one good version is downloaded?

or

B) Make sure it’s actually downloaded a new/higher quality episode before deleting the old version?

I’ve just bumped up my logging to “debug” level in the hopes that it’ll catch this issue happening again. I’m not sure there will be anything useful in the “info” level logs.

This is done automatically once the cutoff is met (in the profile attached to the series).

It only does it when there is something to import, it can do it in error if settings are configured wrong, such as the Drone Factory folder pointed at already sorted files (either the root folder or a specific series folder), but unless it runs into permission problems moving the file after it deletes the existing file something will be imported.

Debug is definitely a good place to start with the logs as Info logs don’t show the underlying activity, just that it happened.

Thanks for the help!

Sonarr just deleted all my Star Wars Rebels episodes…

http://pastebin.com/qesnatEQ history snippets

http://pastebin.com/bdyNHMTs Debug log snippets
https://dl.dropboxusercontent.com/u/176772/nzbdrone.0.txt Dropbox link to full log file.

I don’t have Drone Factory enabled (no directory specified and 0 update interval configured) since I was under the impression that it wasn’t needed with SABnzdb API integration.

Most of my series are configured to use the “Any” profile, and I’ve re-arranged that so that the 720p are preferred.

Do you have TV sorting on in SAB?
Does SAB move completed downloads to: Z:\TV Shows\_Series_\Season #?

What appears to be happening is SAB downloads, tells Sonarr to look in the specified folder and Sonarr checks the folder and sees a bunch of files waiting to be imported and because the path is different than the series folder Sonarr deletes the sorted file and attempts to import the file, but because the source and the sorted files are actually the same it fails.

You definitely don’t want to mix sorted and unsorted files and SAB shouldn’t sort anything, it should download and leave the files with their original file names for Sonarr to process.

I did have TV sorting turned on in SAB. I’ve turned it off and restarted SAB.

Hopefully that’ll fix it and I’ll provide an update tomorrow either way.

Which version of SAB are you running? There is a check we do to check if TV sorting is enabled and warn if it is.

SABnzbd Version: 0.7.20 on Windows 10 64 bit

I didn’t see any warnings on the System status tab.

Disabling the TV sorting appears to have fixed the issue.

Thanks for the assistance.

1 Like

Please is there a way of disabling Sonaar to delete/remove files.

I like to keep TV Sorting within Sabnzbd when i use NZB 360 to send to sabnzbd.

Also i dont mind having multiple quality version of the episode.
I play SD content over wifi to my TV, 720p content via cable on PC so i like having two different copies of an episode.

Users should have this choice.

You do have that option. Turn off Completed Download Handling. Sonarr won’t see the files as being in the queue or imported until the disk scan completes, every 12 hours.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.