[SOLVED] seed ratio&time-based torrent removal rules

Suggest, post, or discuss plugins for Deluge
Post Reply
basher
Leecher
Leecher
Posts: 91
Joined: Wed Sep 29, 2021 8:42 am
Location: Estonia/Spain

[SOLVED] seed ratio&time-based torrent removal rules

Post by basher »

Edit: see next post that shares a version of AutoRemovePlus that uses labels set by LabelPlus as opposed to Label plugin. This sorts it out.

Hi! I need input from more experienced users on configuring Deluge with the help of plugins.

Current setup
I'm running Deluge + autodl-irssi on a seedbox with the intention of ratio building. Same seedbox is also used by Sonarr & Radarr for "real" torrenting needs every now and then. As different private trackers have differing ratio & seed time rules, it makes automatic torrent removal rather tricky.
Running deluge 1.3.15 (can't run v2, it's limitation set by my seedbox provider)

What's my aim?
1) have torrents labled based on tracker;
2) have removal rules configured via seed ratio & time applied for specific labels; seed&time rules need to be logically and'd or or'd together.
3) have default removal & bandwidth rules set for the rest, ie non-labeled public trackers (ie less seeding ratio & time)

What I've tried
  • installed LabelPlus (v0.3.2.2) plugin that:
    - labels torrents based on trackers
    - enforces bandwidth/speed rules for given label
  • installed AutoRemovePlus (v0.6.2) plugin that:
    - sets default seed & time rules in 'General' tab
    - overrides tracker-specific rules in 'Specific Remove Rules', and...
    - i don't quite understand how to use
This setup doesn't work. I suspect the labels added by LabelPlus plugin are not visible/usable by other plugins such as AutoRemovePlus.
At one point I did see torrent removal, but it didn't seem to follow the settings I had set in AutoRemovePlus at all.

LabelPlus does have 'Stop seed at ratio' & 'Remove at ratio' options, but unfortunately no seed time based settings.

Any pointers how to get the intended setup working?
Last edited by basher on Sun Oct 03, 2021 10:01 am, edited 1 time in total.
mhertz
Moderator
Moderator
Posts: 2195
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: seed ratio&time-based torrent removal rules

Post by mhertz »

Autoremoveplus only support label plugin, not labelplus.

I haven't tested it as don't have deluge 1.3.x, but if interessted then could try this mod of latest autoremoveplus for deluge 1.3.x with labelplus instead of label plugin support(built from git, so include an extra webUI fix never gotten into prebuilt release, and I changed days to hours upon request previously, like the newer forks, except for the 'days added').

Sorry don't know much about this plugin, but guess you're correct in choosing it for your use-case.

In the deluge2 forks of it,then sometimes didn't delete because libtorrent returned cached results, so I changed and uploaded fixed versions for that previously, but the get_status() deluge api-function of deluge 1.3.x doesn't have this 'update=True' parameter anymore, so i'm guessing deluge2 is utilizing a newer libtorrent functionality(returning cached results for performance) not available on deluge 1.3.x, so probably not that issue you're encountering, and if is, then sorry I cannot fix that as to big job for my meager abilities.

However, check you have everything setup correct e.g. I think the hdd space option should be '-1' and amount of torrents 0 - sorry I cannot remember fully and not use this plugin myself.

If others have some input then please jump in as I don't have much hepfull input here honestly.

https://paste.c-net.org/UtteredBucks

Edit: After rechecking deluge source-code and libtorrent docs, then see my previous comment regarding the possible caching-issue, isn't an issue on deluge1 regardless, and hence don't need any fixing, as deluge1 don't return cached results from libtorrent, and actually is deluge not libtorrent caching the status from libtorrent by default on deluge2.
basher
Leecher
Leecher
Posts: 91
Joined: Wed Sep 29, 2021 8:42 am
Location: Estonia/Spain

Re: seed ratio&time-based torrent removal rules

Post by basher »

Thank you @mhertz!

I'll give your provided mod a go. Correct me if I'm wrong, but I just realized that the AutoRemovePlus 0.6.2 version I had been using so far already measured hours instead of days - as the UI labels suggest - as diffing the unpacked eggs shows the only changes made by your version are the Label->LabelPlus plugin references. That would explain this from the initial post: "At one point I did see torrent removal, but it didn't seem to follow the settings I had set"

Assuming 'seeding_time' torrent status is in seconds, then that's it, as both versions have

Code: Select all

    'func_seed_time': lambda (i, t):
        t.get_status(['seeding_time'])['seeding_time'] / 3600.0,
Anyway, I'll give it a go and report back!
mhertz
Moderator
Moderator
Posts: 2195
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: seed ratio&time-based torrent removal rules

Post by mhertz »

You're very welcome mate :)

Then you where using my last posted version in the autoremoveplus thread(before the one in this thread) which I made by request of doing just that(hours instead of days) and included the extra webui bugfix from git, which also upped the version to 0.62. Anyway, I downloaded that version, unpacked it and added the labelplus change - there where no new commits so no need clone fresh from git and redo the days to hours change again I thought, hence your diff being like that.

This is the original 'func_seed_time' btw:

Code: Select all

'func_seed_time': lambda (i, t):
        t.get_status(['seeding_time'])['seeding_time'] / 86400.0,
basher
Leecher
Leecher
Posts: 91
Joined: Wed Sep 29, 2021 8:42 am
Location: Estonia/Spain

Re: seed ratio&time-based torrent removal rules

Post by basher »

This seems to be it! I just changed the UI item labels so days & hours are explicitly mentioned.

For any future searchers, this is how the original needs are met:
1) LabelPlus plugin labels torrents by tracker
2) this version of AutoRemovePlus sets seed time and/or ratio based removal rules per label set by LabelPlus plugin
3) this version of AutoRemovePlus sets global/general seed time and/or ratio based removal rules that apply to all other cases where label-specific rules don't apply

Looks like we could drop LabelPlus altogether and use tracker-specific rules in AutoRemovePlus as opposed to label-specific rules, but as I'm already using LabelPlus for per-tracker bandwidth/speed settings, it fits my use-case perfectly.

Thank you very much man!
chnaski
Member
Member
Posts: 16
Joined: Sun Feb 26, 2023 1:39 pm

Re: seed ratio&time-based torrent removal rules

Post by chnaski »

basher wrote: Sun Oct 03, 2021 9:59 am This seems to be it! I just changed the UI item labels so days & hours are explicitly mentioned.

For any future searchers, this is how the original needs are met:
1) LabelPlus plugin labels torrents by tracker
2) this version of AutoRemovePlus sets seed time and/or ratio based removal rules per label set by LabelPlus plugin
3) this version of AutoRemovePlus sets global/general seed time and/or ratio based removal rules that apply to all other cases where label-specific rules don't apply

Looks like we could drop LabelPlus altogether and use tracker-specific rules in AutoRemovePlus as opposed to label-specific rules, but as I'm already using LabelPlus for per-tracker bandwidth/speed settings, it fits my use-case perfectly.

Thank you very much man!
Thank you for this.
However, I'm new to all this so can you please provide instructions? I'm trying to. follow what you're saying exactly
All i'm trying to do is pause any public torrents and keep private torrents seeding.
i added autoremove plus and labels plus.
i'm just having a hard time knowing how to configure them.
basher
Leecher
Leecher
Posts: 91
Joined: Wed Sep 29, 2021 8:42 am
Location: Estonia/Spain

Re: seed ratio&time-based torrent removal rules

Post by basher »

chnaski wrote: Sun Feb 26, 2023 1:42 pm All i'm trying to do is pause any public torrents and keep private torrents seeding.
Off the top, I'm not sure that's possible at the moment, given ARP doesn't have negation operator, nor rule for private torrents.
If you're using servarr stack for managing your media torrents, then their settings can be used to achieve what you're asking for though; that's what I'm doing myself.
chnaski
Member
Member
Posts: 16
Joined: Sun Feb 26, 2023 1:39 pm

Re: seed ratio&time-based torrent removal rules

Post by chnaski »

basher wrote: Mon Feb 27, 2023 12:31 am
chnaski wrote: Sun Feb 26, 2023 1:42 pm All i'm trying to do is pause any public torrents and keep private torrents seeding.
Off the top, I'm not sure that's possible at the moment, given ARP doesn't have negation operator, nor rule for private torrents.
If you're using servarr stack for managing your media torrents, then their settings can be used to achieve what you're asking for though; that's what I'm doing myself.
i am using servarr stack. can you please explain how you're accomplishing this?
basher
Leecher
Leecher
Posts: 91
Joined: Wed Sep 29, 2021 8:42 am
Location: Estonia/Spain

Re: seed ratio&time-based torrent removal rules

Post by basher »

chnaski wrote: Mon Feb 27, 2023 1:43 am i am using servarr stack. can you please explain how you're accomplishing this?
Eg in sonarr, go to settings->indexers where you're configuring all your indexers individually. Set publics' seed time & ratio targets to 0 and that will cause torrents to be paused by sonarr itself: https://i.imgur.com/KTeKAKK.png

This will have no involvement by the deluge plugins.
chnaski
Member
Member
Posts: 16
Joined: Sun Feb 26, 2023 1:39 pm

Re: seed ratio&time-based torrent removal rules

Post by chnaski »

basher wrote: Mon Feb 27, 2023 8:48 am
chnaski wrote: Mon Feb 27, 2023 1:43 am i am using servarr stack. can you please explain how you're accomplishing this?
Eg in sonarr, go to settings->indexers where you're configuring all your indexers individually. Set publics' seed time & ratio targets to 0 and that will cause torrents to be paused by sonarr itself: https://i.imgur.com/KTeKAKK.png

This will have no involvement by the deluge plugins.
thanks
Post Reply