Deletion of files on failed downloads

I noticed this morning that NzbDrone deleted 3 files from the series Orphan Black which were all WEDL-720p. A 1080p Bluray release was downloaded but failed because of some reason or the other. Anyway, episodes 1,2 and 3 were failed downloads but NzbDrone assumed that they were unpacked or preparing to replace the WEBDL-720 ones.

Question: Should drone wait until the actual file is in the factory folder and then overwrite the original of lesser quality? I have also never had this issue with v.1.

Another issue I had this morning was trying to grab a season of Pretty Little Liars (S02). NzbDrone only grabbed 2 episodes (1 & 16) which were both in German.

There is something definitely wrong here.

Shedrock

NzbDrone only deletes existing files when the file is successfully downloaded. It does that as the final step before the new file is sorted and renamed. It will log: "Removing existing episode file: " just before the old file is deleted. Prior to deletion the media files (which includes these file extensions only: .mkv, .avi, .wmv, .mp4, .mpg, .mpeg, .xvid, .flv, .mov, .rm, .rmvb, .divx, .dvr-ms, .ts, .ogm, .m4v, .strm) under go a couple of checks to ensure they are valid:

  • Upgrade to existing file (if there is one)
  • Not a sample (over 70MB in size or at least 3 minutes long, if both fail it rejected)

Only then does NzbDrone do the above process of removing existing files and then moving the new one.

A quick search shows the Pretty Little Liars releases do not have language markers in the title, but on the indexer I checked they were properly categorized as TV-Foreign, which is a category NzbDrone does not search. If your indexer is not properly moving those files to another category there is a potential for this issue to re-occur.

Without adequate trace logs of other than expected behavior, I can only rely on what I know from the code. If you see something else in the logs, please let me know.

Please have a look at the logs and let me know if anything is weird in there. I am at a lost as to why the 3 episodes were deleted. They did however work when I downloaded them manually.

If nothing shows up in the log files, I will put back up v.1 to test and see what happens.

Found the issue, the file was still being extracted when NzbDrone processed it (the unrar hadn’t failed yet), so NzbDrone deleted the file and then tried to move it which failed because the file was in use.

Added this card on Trello: https://trello.com/c/Q0xCiLvk/270-ensure-file-is-not-in-use-before-importing - I’ll probably tackle this later today.

This wouldn’t have popped up in v1 because it ignored folders that started with UNPACK we removed that in v2 because SAB sometimes fails to rename the folder and then things were left and not imported.

ok cool. What about the automatic grabbing of season? I am still at a lost with this. Last night I grabbed S02 of Pretty Little Liars and only 2 episodes (German/English) were grabbed from the same site. I just tried it now and it grabbed episodes 17-25, even though all are available on the site.

I deleted the (2) episodes it grabbed last night and refreshed NzbDrone and this time it won’t grab the same 2 episodes or even any others besides those I mentioned above.

I think there might be an issue with the tv rage searching for a season, which is why your newznab sites gave zero results and nzbclub gave 25.

That brings up another issue:
Due to how nzbclub works, NzbDrone needs to send two queries to them, which usually (99.9% of the time) results in the 2nd call failing. Plus it doesn’t filter results wich is likely why you got that german release (newznab sites should filter that to the TV-Foreign).

For the best results I’d suggest disabling NzbClub.

So then I am better off disabling NzbClub for now then? I will try it and see what happens.

Update: This didn’t produce any different results during automatic search.

Thanks

There is still an issue with season search as I mentioned above, it should be fine for individual episode searching.

@markus101 said:
I think there might be an issue with the tv rage searching for a season, which is why your newznab sites gave zero results and nzbclub gave 25.

Still think NzbClub should be off since it only half works.

ok, I will leave it off.

Both issues should be resolved as of version 2.0.0.146. If you still have issues, let us know.

No problem. Thank you.

I found a problem with this last night as I suspected would happen. If you’re using Library Watchdog for XBMC and NzbDrone dumps the original file into the appropriate series folder, watchdog automatically scan this file into library.

Once that is done and drone does the proper renaming, it scans the file again because watchdog sees it as a new entry, therefore leaving 2 entries in XBMC.

Shedrock

You should turn off watch dog and let NzbDrone tell XBMC to update. In the end they both do the same thing.

But what about movies? When I drop a new movie into one of the hd’s I need watchdog to run the update process on the drive that just received the movie.

I don’t know if I turn off “Exclude path from library updates” in XBMC if it would still update with NzbDrone. I think it won’t.

Update: Tested it with the exclusion option in XBMC and it does not work that way.

Can the watchdog be configured to only watch certain folders or types (movies not TV)?

The more I think about this the more I don’t like our solution though. I’ll take another look at this.

Unfortunately watchdog does not have that option. Hopefully you guys will find a better work around than the current one.

If not, then I will just have to deal with it.

btw: Wasn’t there an option to update XBMC library in v.2? IF it is there I must be blind.

Thanks

There is. Settings Connect then add an XBMC one. The modal scrolls, as there are a lot of options.

Thanks, it was on, I just didn’t notice the scroll bar.