Sonarr replaced episode while watching

Might be an unavoidable event, but my wife was just watching a show (Chicago Fire) and while she was watching it I noticed Sonarr began downloading a replacement. I was curious to see what would happen, and perhaps unsurprisingly, once it finished downloading, Sonarr processed it and deleted the old file, causing Plex to jump back to the menu. Upon restarting (with the new file) there was no watched status so it couldn’t resume and we had to manually fast forward to the point she was up to.

Thinking about it this has almost certainly happened before, we just never knew why.

Is there any way to stop this? Not a huge problem - probably happened five times at the most, and is just bad timing, but wondered if there was a way Sonarr could pause the import of the new file if it detects the old file is in use?

The only way its going to know if it’s in use is if its locked, but that really only applies to Windows as it is lock happy whereas other OSes don’t usually lock if at all.

Plex might also not lock the file on Windows, I’m not sure how it operates in that regard.

TLDR: I don’t think there is anything we can do in this case.

Thanks Marcus! Thought that may be the case…

A possible ineffiecient work-around. Have file replacements only occur if during ‘off hours’ with off hours defined in settings (I’d use 2am-10am myself).