[Plugin] Auto Remove Plus v2.0.0

Suggest, post, or discuss plugins for Deluge
kiwitech62
New User
New User
Posts: 6
Joined: Wed Apr 29, 2020 1:10 pm

Re: [Plugin] Auto Remove Plus v2.0.0

Post by kiwitech62 »

I've installed the latest version of Auto Remove Plus v2.0.0 into Deluge v2 however I'm not sure of what all of the options mean, and the best settings to configure. Appreciate it if someone could give a summary of what each of the options mean and what they would recommend to set them to. Also examples of "Exemption Rules" and "Specific Remove Rules"

I use Deluge as my bittorrent downloader for Radarr, Sonarr and Lidarr. My personal requirements are to seed for up to 7 days and then delete, as I have limited storage. Also I often get torrents that don't have 100% peers so download up to the maximum peer progress % and then just sit there and never complete. Sometimes they get a new peer and eventually complete, however I'd like to be able to set a maximum time for it to keep trying before deleting incomplete downloads. Is this possible with the plug-in, or is there another way of configuring that to happen?
mhertz
Moderator
Moderator
Posts: 1333
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: [Plugin] Auto Remove Plus v2.0.0

Post by mhertz »

I'm not very knowledgeable about these plugins either, as don't use myself, but since you want conditions for both finished and unfinished torrents, plus use radarer, sonar and lidarr, then maybe check out springjools fork, e.g check in the other autoremoveplus thread here. On the github project pages, there's some examples of options, and the special and exemption rules I believe is for defining special rules for trackers and/or labels, special or exemption rules, so special cases for those, if having such, and/or exclusions for such(exemptions) .

If using springjools fork, then use the drop down boxes for unfinished torrents(so ignore seed related options) and use the upper options for seed removals. Note GTKUI prefs broken, so configure from webui prefs or manually edit config file. Also, I'd use my first fixed version from last post in other thread here.
kiwitech62
New User
New User
Posts: 6
Joined: Wed Apr 29, 2020 1:10 pm

Re: [Plugin] Auto Remove Plus v2.0.0

Post by kiwitech62 »

Hi mhertz, and thanks for your reply. I've downloaded the first version you had on post 1083 on this web page in the other thread:

viewtopic.php?f=9&t=47243&p=233391&hili ... rk#p233391

and installed it successfully. As you said in your posting it it has a few different "Remove by" options, such as "Age in Days" and "Availability" which look like they will do what I need regarding incomplete downloads. However I'm still not exactly sure how I should configure the settings. I want completed downloads removed after 3 days so have set "Pause after seedtime" to 48 hours and "Remove after seedtime" to 72 hours, and want to remove any incomplete downloads older than 7 days so have set "Remove by availability under 1" and "Remove by Age in Days over 7". I'm not sure how the 'xor' operator on the last 2 options will make them work? Also do I need to pause the file before removing it, or can I set the pause and remove times the same? I'm not very knowledgeable about torrents and seeding, etc.

And can you explain the Remove By "Time since transfer (h)" option? What transfer is being referred to?

Also would like to clarify exactly what the "Remove torrents", "Remove torrent data", and the "Remove torrent data also for completed torrents" options cause to happen, if you can explain them.

Also wondering if it's going to be updated to GTK3UI capable. The Auto Remove Plus v2.0.0 plug-in from this thread works through both the GTK3UI and the WebUI. I'm not a programmer so don't know what's involved in getting that working.

Apologies for so many questions, and if some of my questions seem obvious. I just want to make sure my understanding of the various options is correct.
mhertz
Moderator
Moderator
Posts: 1333
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: [Plugin] Auto Remove Plus v2.0.0

Post by mhertz »

kiwitech62 wrote:Hi mhertz, and thanks for your reply. I've downloaded the first version you had on post 1083 on this web page in the other thread:

viewtopic.php?f=9&t=47243&p=233391&hili ... rk#p233391

and installed it successfully.
You're welcome, and sorry for not linking directly to post, as see you did a search for it.
As you said in your posting it it has a few different "Remove by" options, such as "Age in Days" and "Availability" which look like they will do what I need regarding incomplete downloads. However I'm still not exactly sure how I should configure the settings. I want completed downloads removed after 3 days so have set "Pause after seedtime" to 48 hours and "Remove after seedtime" to 72 hours, and want to remove any incomplete downloads older than 7 days so have set "Remove by availability under 1" and "Remove by Age in Days over 7". I'm not sure how the 'xor' operator on the last 2 options will make them work? Also do I need to pause the file before removing it, or can I set the pause and remove times the same? I'm not very knowledgeable about torrents and seeding, etc.
The remove seedtime condition gets checked/run before the pause seedtime one, so if remove seedtime condition is true(seed-time > seed-limit), then pause seedtime check not run, as is an 'elif' in code. Note if you deselct lower checkbox of pause torrents, then that 'elif' fails regardless in next line as check is made for that, so no pausing will occure whatever that pause seed-time set to then.

that example for unfinished sounds OK to me, and there is example on github project page with that, just 3 or 4 days can't remember exactly, instead of yours of 7. Springjools once said he used the same as you for first, and second was time since last seen complete over 20h, for his controlling of stuck torrents, but setting age in days should be fine too as per project page example also.

Instead of 'and' or 'or' then 'xor' means 'either of' or so to say, meaning either condition 1 or condition 2 needs be true to trigger, but won't if none or both is('or' would trigger still if both true, as means "and/or", but 'xor' is a hard "or" literally). Atleast that is the terminology in programing/scripting, I believe.

If both remove and pause seed-time is the same, then remove takes precedense and other ignored, though if not even having pause torrents enabled in lower options, then either way the upper pause seedtime ignored regardless, in next line of it's check function, so no effect.
[...] And can you explain the Remove By "Time since transfer (h)" option? What transfer is being referred to?
Deluge has an API function for quering libtorrent for 'time_since_download' and 'time_since_upload', and then takes the lowest value of them and returns as 'time_since_transfer' value, which is exposed as a condition in this plugin, so in short, time since last transfer in hours, either in up or down-load. Atleast that is my understanding of it.
Also would like to clarify exactly what the "Remove torrents", "Remove torrent data", and the "Remove torrent data also for completed torrents" options cause to happen, if you can explain them.
Remove torrents, removes torrents, e.g. you could unselect and instead select pause them etc, i'd guess most would have this checked though as also is default(remove torrents). Remove torrent data removes also the data and not just the torrent, but this works only for the unfinished torrents(so the lower conditions), and if you also want this for finished torrents, so in upper options, then tick this additionally.
Also wondering if it's going to be updated to GTK3UI capable. The Auto Remove Plus v2.0.0 plug-in from this thread works through both the GTK3UI and the WebUI. I'm not a programmer so don't know what's involved in getting that working.
Springjools was working "in blind" for that, as used webUI and not GTKUI and so did what he could but couldn't test. Also he added the "abiroid mod", where functionality was changed towards unfinished torrents and to have over/under separated conditions, and then springjools also added a few options for finished torrents additionally, so both working for stuck and seeding ones, plus added other enhancements(e.g. sonarr/radarr/lidarr integration + mediaserver.py command-line client for it, "under/over" seperated conditions and hours instead of days, etc) and added fixes also. Tote94 didn't change/add as much, but had more luck with the GTKUI part. As springjools didn't use it himself, I guess it wasen't high in priority, though did what he could regardless, and I don't know if or when it will get fixed. Though keep in mind it works fine from GTKUI and just is the initial setup that is missing from it, which i'd presume usually is a one time job and set it and forget it kinda thing mostly.
Apologies for so many questions, and if some of my questions seem obvious. I just want to make sure my understanding of the various options is correct.
No problem and understandable :) As said, I don't use this myself, and possibly have misunderstood the code at places, so please take what I say with a pinch of salt :)
Last edited by mhertz on Wed May 05, 2021 5:06 pm, edited 1 time in total.
kiwitech62
New User
New User
Posts: 6
Joined: Wed Apr 29, 2020 1:10 pm

Re: [Plugin] Auto Remove Plus v2.0.0

Post by kiwitech62 »

Hi again, and thanks for your very thorough and informative reply. Much appreciated. You've clarified and confirmed everything I was unsure about. It looks like my understanding of the settings were correct so I'll play around with a couple of the settings and see if the results match my expectations over the next few days.

As to it not working with GTK3UI, as you say its generally something you set and forget, so not really an issue as I can access it using the WebUI, or manually edit the config file. It has the features I'm looking for which the v2.0.0 plug-in doesn't, so that's what really matters. I will keep monitoring both of the plug-ins in case either of them get updated. Cheers.
mhertz
Moderator
Moderator
Posts: 1333
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: [Plugin] Auto Remove Plus v2.0.0

Post by mhertz »

I updated my fixed version of this plugin(for the "sometimes-only-removing-when-opening-gui" issue) to support labelplus instead of label plugin. Only tested shortly but seemed working:

https://paste.c-net.org/BenesGeraldo
mhertz
Moderator
Moderator
Posts: 1333
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: [Plugin] Auto Remove Plus v2.0.0

Post by mhertz »

Here's my fixed version of tote94's fork now with new checkbox in gtkui and webui to control switching between label and labelplus plugin. Also now supports unlabeled exempt labels and unlabeled specific removal rules - for both you define label as 'none', case-insensitive. Seemed to work in quick testing here.

AutoRemovePlus-2.0.0.egg
basher
Member
Member
Posts: 14
Joined: Wed Sep 29, 2021 8:42 am
Location: Estonia

Re: [Plugin] Auto Remove Plus v2.0.0

Post by basher »

Thinking of starting yet-another-fork of ARP plugin.
@mhertz I know you're not the creator of this plugin, but you're certainly the overall most knowledgeable person around, so if you don't mind I have a few questions. Note I'm not expecting any code changes from anyone, just trying to fully grasp the logic before starting the new fork.

1. Which fork generally seems to work better, tote94's or springjool's?
Looking at code I tend to prefer the latter, but would personally remove all the servarr related code. It's still buggy it seems, and too specific to this plugin, IMHO.
2. Why is the torrents list sorted? Seems a bit odd as to why it's done, and why are is the sorting key a tuple of (bool, bool).
3. It should be indicated to the user that the very first specific rule's Operator gets ignored. Note how specific_rules[0][0] is never referenced, meaning it's effectively ignored. Tried to disable the Operator column for the first element, but GTK is bit more complex than I expected.
4. Why are the specific rules sorted by the operator? I see two issues with it:
4.1 users don't know from the UI which order the rules will end up being evaluated in;
4.2 moving all AND conditions to the front of the list makes actually less sense than to the back. Imagine we have 3 conditions: OR, AND, OR. This would get sorted into AND, OR, OR. Because of how the rules are evaluated (discussed above on 3rd point), the AND operator would get dropped, and we're effectively left with OR, OR. If AND was in the back of the list, we'd end up with OR, AND - more likely what user wants. Although as I mentioned, I think there should be no sorting whatsoever, and let users define the ordering.

What are your thoughts?
mhertz
Moderator
Moderator
Posts: 1333
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: [Plugin] Auto Remove Plus v2.0.0

Post by mhertz »

Great to hear you're starting new fork, that sounds awesome, thank you! :) Also, thanks for your kind words mate, appreciated, though honestly not the case, but again, much appreciate the sentiment.

As for your questions, I'm sorry but I honestly don't know, and I unfortunetly cannot give any input as you're way smarter than me as is :) Im not a programmer myself and things I do are very easy and just quick hacks.

I neither know which fork works best, and just know springjools stated upon tote's first announcement that he missed some fixes:
jools772 wrote: Wed Oct 28, 2020 3:12 pm Don't fork old branches, there are a bunch of fixes that you didn't include.
Again, I'm sorry could not help you and especially since you made such effort in your post with code-section quotes and whatnot. Anyway, looking forward following your development :)
basher
Member
Member
Posts: 14
Joined: Wed Sep 29, 2021 8:42 am
Location: Estonia

Re: [Plugin] Auto Remove Plus v2.0.0

Post by basher »

No worries mate. I'll just go with what makes sense to me and try my best to better document & explain how it all works.
Without looking at the code the plugin interface is crazy unintuitive. Eg who would've known that if any of the 'specific remove rules' apply to torrent, none of the general rules do!
Post Reply