Watcher3 icon indicating copy to clipboard operation
Watcher3 copied to clipboard

Completed torrents not being removed

Open jamaroney opened this issue 4 years ago • 20 comments

This has always been an intermittent problem since I started using Watcher about 2 years ago, but now it's constant.

"Remove Finished Torrents" box is checked "Stop seeding when ratio X is reached" - set to any positive whole number

When the ratio is reached, the torrent stops seeding, but isn't removed. A while back it actually worked on occasion (but by no means the majority of times), but in the last few months it has stopped working completely.

I've always used the latest version of Watcher (auto update). I'm currently on FreeBSD 12.1 w/ Transmission 3.0, but the problem has existed w/ earlier versions of both.

I don't know if it's relevant, but I have the same feature enabled in Sonarr w/ absolutely no problems.

jamaroney avatar Jan 21 '21 13:01 jamaroney

I've been chasing this since I upgraded to Tx 3.0. Did you see it on earlier versions?

barbequesauce avatar Jan 23 '21 00:01 barbequesauce

I've been chasing this since I upgraded to Tx 3.0. Did you see it on earlier versions?

Yes. As I noted in my earlier post, this also occurred in Transmission 2.9.* versions.

jamaroney avatar Jan 23 '21 00:01 jamaroney

Can you grab a debug log please? I'd like to compare to mine...

barbequesauce avatar Jan 23 '21 00:01 barbequesauce

The next time I download a movie I'll send the debug log

jamaroney avatar Jan 23 '21 11:01 jamaroney

Here's a debug log. I was downloading "Honest Thief" yesterday - it was the only file I was downloading at the time. I set the ratio for the torrent to 1, and Transmission completed its seeding (status - "Finished") sometime early this morning while I was sleeping. I included only the later part of the log (while it was still seeding), until after its completion. debug.txt

jamaroney avatar Jan 24 '21 11:01 jamaroney

Just added some logging around the decision process - if you can update and then post another log once you've snatched/finished a movie please...

barbequesauce avatar Jan 24 '21 21:01 barbequesauce

Here's the log for "Soul", which finished seeding a little while ago today, and is still there in Transmission listed as "Finished".

log.txt

jamaroney avatar Jan 24 '21 21:01 jamaroney

Noticed this in the logs - does that make sense to you? Not related to your concern, just interesting...

NFO [2021-01-26 06:52:11,531] core.plugins.execute.263: encode.py - b"/usr/local/bin/python3: can't open file '/mnt/HDD/extensions/watcher/plugins/finished/encode.py': [Errno 2] No such file or directory"
WARNING [2021-01-26 06:52:11,532] core.plugins.execute.267: encode.py - Execution failed. Exit code 2.

The develop branch has some additional logging, if you wouldn't mind switching and trying there?

barbequesauce avatar Feb 21 '21 02:02 barbequesauce

I have no idea what those log messages mean. I didn't have any plugin scripts set to run.

How do I convert to develop branch without losing all my current settings? I originally installed Watcher via a ZIP file, not through git.

jamaroney avatar Feb 21 '21 11:02 jamaroney

Not sure... anytime I've seen someone make that jump they do a new install from GitHub and copy over the ini/db..

barbequesauce avatar Feb 22 '21 00:02 barbequesauce

I made the switch to develop branch (far easier than I feared), and then downloaded "Space Sweepers" (2021). Same results - it reached its max seeding ratio (marked as "Finished" in transmission), and is still there. Attached is the debug log. log.txt

jamaroney avatar Feb 22 '21 20:02 jamaroney

OK - update to that please.

The original added log lines pointed at the issue I expected, but I'm guessing that we are handling the config option badly - either loading from the config or referencing here. This last bit of logging should clear that up.

barbequesauce avatar Feb 23 '21 02:02 barbequesauce

Updated to newest develop branch. Downloaded same movie as before (got rid of all traces of the old movie files and torrent beforehand). Attached is the new log.

On a similar note: How would one confirm if a develop branch has been installed? I did a clean install, but the "Current version hash" on the "Server" page shows the latest master branch. Is that normal? log.txt

jamaroney avatar Feb 23 '21 13:02 jamaroney

So that solves that - the torrent client shows the torrent in status "seeding", not "finished":

INFO [2021-02-23 06:56:18,387] core.scheduler.check_torrents.384: Torrent status 28bf3e6c36005869ed1f89e1ffd640be076856e4 [seeding] (b'Space Sweepers (2021) [720p] [WEBRip] [YTS.MX]'); removetorrents: True

To confirm branch: git status

watcher@pi:/opt/watcher3 $ git status
On branch develop
Your branch is up to date with 'origin/develop'.

nothing to commit, working tree clean
watcher@pi:/opt/watcher3 $

barbequesauce avatar Feb 24 '21 04:02 barbequesauce

Yet the torrent in Transmission has reached the correct seed ratio and states that the torrent is "Finished," and has definitely stopped seeding. So, is there something in "transmission.py" that needs to be changed?

Since I don't use git, is there any other way to confirm develop branch? It's not important, just curious....

jamaroney avatar Feb 24 '21 10:02 jamaroney

looks like the transmission rpc spec does not update the status to finished but instead uses a flag to indicate isFinished (see reference here). I have some homework to do...

barbequesauce avatar Mar 08 '21 01:03 barbequesauce

Thanks for your diligence with this.

jamaroney avatar Mar 12 '21 10:03 jamaroney

That seems to work here...

barbequesauce avatar Mar 12 '21 14:03 barbequesauce

Installed the patched version. Downloaded two movies, and both are "Finished." Neither has been removed.

jamaroney avatar Mar 13 '21 10:03 jamaroney

Out of the blue, Watcher actually deleted a finished torrent! But afterward, it went back to its usual mode of not removing. Here's the essential log files for both:

INFO [2021-03-30 01:49:28,267] core.scheduler.check_torrents.384: Torrent status b741363904a505a5129b03c466d15aece90e7fdc [finished] (b'The.Insider.1999.1080p.BluRay.x265-RARBG'); removetorrents: True INFO [2021-03-30 01:49:28,269] core.scheduler.check_torrents.386: Check if we know finished torrent b741363904a505a5129b03c466d15aece90e7fdc and is postprocessed (b'The.Insider.1999.1080p.BluRay.x265-RARBG') INFO [2021-03-30 01:49:28,302] core.scheduler.check_torrents.388: Yes, now we remove the torrent INFO [2021-03-30 01:49:28,304] core.downloaders.Transmission.cancel_download.188: Cancelling download # b741363904a505a5129b03c466d15aece90e7fdc in Transmission.


INFO [2021-03-30 08:49:28,306] core.scheduler.check_torrents.384: Torrent status a37f3eeab6612bcb6451e5e9061a4ba796b3f641 [finished] (b'www.lyrics.lol - The.Father.2020.1080p.WEBRip.x264-MOTHER'); removetorrents: True INFO [2021-03-30 08:49:28,308] core.scheduler.check_torrents.386: Check if we know finished torrent a37f3eeab6612bcb6451e5e9061a4ba796b3f641 and is postprocessed (b'www.lyrics.lol - The.Father.2020.1080p.WEBRip.x264-MOTHER') INFO [2021-03-30 08:49:28,324] core.scheduler.check_torrents.391: No, did not find the torrent as finished

jamaroney avatar Mar 31 '21 09:03 jamaroney