qBittorrent and torrents not being removed/deleted

Sonarr version (exact version)**: 2.0.0.5252
OS: Windows 10 Pro x64 (1709)

I’m wondering if I have some setting wrong but apparently Sonarr is unable to remove a torrent with files from qBittorrent.

Since I’m a DriveBender user (which doesn’t support hardlinks on pooled drive), I set Sonarr to copy files in the Media Management tab. I have rename disabled, so files keep the original filename they’re downloaded with.

Files are copied to my TV Shows folder on the pooled drive, and the seeding original is kept on the separate hard drive it was downloaded to.

I have seed time for my indexer set at 1500 minutes for single episodes (25 hours, to err on the cautios side, as share requirement is 24 hour on my tracker).

I have this file that I’ve downloaded yesterday through Sonarr, now more than 25 hours ago (checked with logs), and it’s not being removed/deleted. I have the Remove option under Completed Download Handling activated.

My expectation is for Sonarr to instruct qBittorrent to keep on seeding until the time is up and then remove the torrent and file from the original location (keeping the copy it created in my TV Shows folder).

I am having a similar issue, where episodes are frequently left behind; however, it is typically when there is an episode collision where manual intervention is necessary. I have my seed time set to zero. Since you can’t use hardlinks, I suspect that is your problem. I believe when the episode is moved is when it would be removed from qBittorrent - which is why you would need to immediately need to stop seeding, however, that won’t work in your case.

A thought: Have you looked into using qbittorrent to remove the link instead due to your requirements?

Checking here https://github.com/Sonarr/Sonarr/wiki/Completed-Download-Handling I suppose I’m doing everything correctly, and it simply is not working for whatever reason.

What is strange is that I don’t have errors in Sonarr’s log, related to being unable to remove torrents from qBittorrent. It’s like it’s not even trying.

The only thing I found in logs is this entry, related to the first (and so far only) episode that should already have been deleted and it’s not been. The warning comes right after the file is sent to qBittorrent (where then it downloaded correctly, copied to my library folder, keeping the original file seeding).

18-10-12 17:23:31.5|Info|DownloadService|Report sent to qBittorrent. DownloadedEpisodeName.s02.e03
18-10-12 17:23:31.5|Info|EpisodeSearchService|Episode search completed. 1 reports downloaded.
18-10-12 17:27:58.3|Warn|EpisodeFileMovingService|Unable to set last write time

[v2.0.0.5252] System.IO.IOException: The process cannot access the file 'D:\TV Shows\TVShowName' because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.Directory.OpenHandle(String path)
   at System.IO.Directory.SetLastWriteTimeUtc(String path, DateTime lastWriteTimeUtc)
   at NzbDrone.Common.Disk.DiskProviderBase.FolderSetLastWriteTime(String path, DateTime dateTime) in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Common\Disk\DiskProviderBase.cs:line 265
   at NzbDrone.Core.MediaFiles.MediaFileAttributeService.SetFolderLastWriteTime(String path, DateTime time) in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Core\MediaFiles\MediaFileAttributeService.cs:line 75
   at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.TransferFile(EpisodeFile episodeFile, Series series, List`1 episodes, String destinationFilePath, TransferMode mode) in C:\BuildAgent\work\5d7581516c0ee5b3\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:line 127

Since then, two other files have been added but did not exhibit this warning. Later today I will be able to check if those remove correctly.

Are there no other conditions in play? E.g. seed for x minutes / ratio y? An overall setting in your torrent client?

Sonarr won’t even bother to try and delete a torrent if the torrent client doesn’t flag it as “complete”.
I’m not sure what the terminology is in qBittorrent, but by “complete” I mean “the file is 100% downloaded and ALL seeding conditions are met”.

Who is “it” in this sentence? Is qBittorrent doing the copying?

Nope, I don’t have any extra seeding limits set up in qBittorrent. The time limits have been setup through Sonarr Download Client settings.
So yeah, the file is 100% completed and all seeding connections are met (as there are none set up in qBittorrent).
I use qBittorrent 3.3.16 that doesn’t even have settings for seeding time limits (it was introduced with 4.0, together with a boatload of problems that prompted me to downgrade).

In the sentence you quote “it” is Sonarr. Sonarr does the copying, as I have deactivated hardlinks use (not supported by DriveBender, the hard drives pooling software solution I use).

Sonarr adds the torrent to qBittorrent, qBittorrent downloads it, when it completes the download Sonarr copies the file to my library, keeping the original download in order to complete seeding time I set up, for my indexer, in Sonarr settings. The problem I have is that after seeding time is complete, the original download remains seeding in qBittorrent.

image

After reading this: https://github.com/Sonarr/Sonarr/issues/1316 I wonder whether what I’m trying to achieve is possible.
I use my qBittorrent client with several different trackers which have different seeding requirements (both time and/or ratio based).

As such, I can’t use a single max ratio after which the torrent is paused (it would interfere with torrents I wish to keep seeding for bonus points calculation).
I might have been misled by the indexer configuration settings available (see previous post with picture attached) but might it be that those options (seed time limits) simply won’t work with qBittorrent?

Hmmm… reading the web interface documentation for qBittorrent, though, leaves me with the impression that Sonarr, if it keeps track of seed time internally, should be able to delete torrent and files with no problem: https://github.com/fedarovich/qbittorrent-cli/wiki/Getting-Started

I tried pausing manually the torrent and it instantly got deleted. Since this is not a behaviour I configured in qBittorrent, this must come from Sonarr. But I don’t get why this is happening. What’s the point of having seed time limits in the indexer configuration if Sonarr requires action in the torrent client to pause the torrent before being able to handle it correctly (deleting it, in my case)?

I paused another torrent, which had just reached its time seeding requirement for my tracker (24 hours). It instantly got deleted as well. BUT, and this is worrying, this happened without honoring the indexer configuration which, as you can see in the picture above, I set at 1,500 minutes (25 hours).
I’m left wondering what are those settings for in the indexer config screen. As far as I can see they’re totally useless.

Anyone has insights on this?

Sonarr does not track the seeding time internally, it will set the seeding goals for some clients when torrents are added, but qbit is not one of them.

Ok. Then I suppose I’ll keep on handling manually the deletion of files once seeding requirements (time based) are reached.
Thanks for looking into this.

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