[Plugin] Auto Remove Plus v0.6.1

Suggest, post, or discuss plugins for Deluge
Auguss
New User
New User
Posts: 5
Joined: Mon Sep 23, 2013 11:26 pm

Re: [Plugin] Auto Remove Plus v0.6.1

Postby Auguss » Thu Dec 17, 2020 3:53 pm

Because it was written in decimal instead of minutes. Who needs that fine grained setting of calculation?

Bobby
Member
Member
Posts: 31
Joined: Wed Aug 05, 2020 7:37 pm

Re: [Plugin] Auto Remove Plus v0.6.1

Postby Bobby » Sat Jan 02, 2021 2:20 pm

Does anyone know if this plugin is working with labelplus ? :-) I am using deluge 1.3.15

logue1021
New User
New User
Posts: 1
Joined: Sun Jan 10, 2021 12:23 pm

Re: [Plugin] Auto Remove Plus v0.6.1

Postby logue1021 » Sat Jan 16, 2021 11:00 pm

My install:

Code: Select all

deluged 2.0.3
libtorrent: 1.1.13.0
Python: 3.8.5
OS: Linux Ubuntu 20.04 focal

I've got AutoRemovePlus-0.6.15-py3.8.egg-tmp installed into my /var/lib/deluge/.cache/Python-Eggs/ path

I can't seem to understand the "Remove by Ratio"? I have it set at 2.5, but I have torrents that are vastly above, some 10+:
Image

What I'm trying to do: Have torrents removed after 7 days, OR if they've reached a 2.5 seed ratio. The after 7 days appears to be working, but the seed ratio doesn't.

Log for one of the 10+:

Code: Select all

16:43:08 [DEBUG   ][autoremoveplus.core           :586 ] Now processing name = The.Expanse.S05E07.Oyedeng.1080p.AMZN.WEBRip.DDP5.1.x264-NTG[rarbg], type = <class 'str'>
16:43:08 [DEBUG   ][autoremoveplus.core           :367 ] Space: 2730.409523010254/-1.0
16:43:08 [DEBUG   ][autoremoveplus.core           :90  ] Get ratio: i = b1e28fe5f17065c15d79cbb16c42af37db241c6f, t = <deluge.core.torrent.Torrent object at 0x7f921d0afa90>
16:43:08 [DEBUG   ][autoremoveplus.core           :108 ] Now = 1610836988.4449334, added = 1610500503
16:43:08 [DEBUG   ][autoremoveplus.core           :110 ] Returning age: 3.89
16:43:08 [DEBUG   ][autoremoveplus.core           :433 ] Get_torrent_rules: returning rules for b1e28fe5f17065c15d79cbb16c42af37db241c6f: []
16:43:08 [DEBUG   ][autoremoveplus.core           :108 ] Now = 1610836988.445165, added = 1610500503
16:43:08 [DEBUG   ][autoremoveplus.core           :110 ] Returning age: 3.89
16:43:08 [DEBUG   ][autoremoveplus.core           :689 ] Fin.: The.Expanse.S05E07.Oyedeng.1080p.AMZN.WEBRip.DDP5.1.x264-NTG[rarbg], seed time:102.82/120.0, ratio: 13.598852092028194, spec. rules = [], sr cond. = False/False,isfinished = True, hash = B1E28FE5F17065C15D79CBB16C42AF37DB241C6F


Help please

mhertz
Compulsive Poster
Compulsive Poster
Posts: 1090
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: [Plugin] Auto Remove Plus v0.6.1

Postby mhertz » Fri Apr 30, 2021 11:07 pm

I fixed an issue in springjools fork with some conditions not triggering in thinclient mode without GUI open, like I also did with tote94's fork which I posted in his thread also. The issue was that the TorrentManager get_status() deluge api-call returns cached libtorrent values, and need extra argument 'update=True', as else only updates the cached libtorrent values when GUI opened as uses that itself. I added the argument to dynamic field requests of that call, but not static ones like name and size etc.

AutoRemovePlus-0.6.15-py3.9.egg
Rename to match used python version, if needed.

Also, springjools fork applies conditions only for unfinished torrents, in contrary to tote94's fork(and original plugin), so I made extra alternative version which works only for finished torrents now, just for people preferring that, though then the two above rules for pause or remove seeds based on seedtime, which does work for finished torrents, now doesn't work in this version, as no reason to have two same options I guess. The seedtime option in the dropdown-conditions further down didn't have any effect before, without this mod here, I believe from looking at code. Note, this was very quick, and so there will probably be wrong logging about deleting unfinished torrent, when a finished torrent get removed etc, which I didn't bother to fix up, or other unforseen quirks.

AutoRemovePlus-0.6.15-py3.9.egg
Again, rename to match used python version, if needed.

I made these fixed versions of springjools fork even though I previously made the tote94 fixed version, because this version by springjools includes more fixes and features, though still misses GTKUI preferences dialog and needs be setup with webUI or editing config-file manually. Last, the log of GTKUI states error and failed enabling plugin, but that is not true, and only refers to the GTKUI preferences part of plugin, and not the core functionality, which does work. This isn't something I introduced and also in original fork without my changes.

I'll make a ticket later on the author's github project page to make note of the issue, so that official fix and release can be made.

Edit: Done: https://github.com/springjools/deluge-a ... /issues/36

Edit2: Jools replied he will add this set_status() fix :)

mhertz
Compulsive Poster
Compulsive Poster
Posts: 1090
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: [Plugin] Auto Remove Plus v0.6.1

Postby mhertz » Wed May 05, 2021 12:02 pm

It's very far from perfect, but anyway, I regardless fixed the issues hindering the GTKUI preferences page showing of springjools fork, but as said, it need serious updating as missing bunch of stuff, but atleast now no startup errors in log/terminal upon every GTKUI startup and atleast some options exposed there, and atleast it's a starting point for springjools to hopefully further expand and work upon, and i'll shortly post a ticket at his github with a diff patch of needed changes. I fixed an issue in setup.py and then rest 31 fixes came from going over gtk3ui.py with a fine-tooth comb, analyzing error-output and comparing triggered lines to tote94's work, so all credit for most fixes to tote94, thank you!

Here's a few pics if interested in how looks and how many options exposed currently, and rest need webUI or manually edit config-file, untill updated further, hopefully, as said.

I will include links further down, for builds of mine with this fix in mean time, and optionally also the thinclient fix and finished-only mod, from last post, As always rename python version to match, if needed.

https://imgur.com/a/FLJnR1z (4 pics in one link - sorry for not just resizing transient window in hindsight, doh!)

AutoRemovePlus-0.6.15-py3.9.egg (GTKUI prefs fix)

AutoRemovePlus-0.6.15-py3.9.egg (GTKUI prefs fix + thinclient fix)

AutoRemovePlus-0.6.15-py3.9.egg (GTKUI prefs fix + thinclient fix + finsihed-only mod)

Edit: Github ticket for this: https://github.com/springjools/deluge-a ... /issues/37
Last edited by mhertz on Thu May 06, 2021 1:19 pm, edited 1 time in total.

mhertz
Compulsive Poster
Compulsive Poster
Posts: 1090
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: [Plugin] Auto Remove Plus v0.6.1

Postby mhertz » Thu May 06, 2021 1:17 pm

Sorry, I guess didn't test good enough, as efter seeing the prefs page and no errors, I "hard-killed" the prefs-window and deluge for some reason, so didn't notice that you cannot press 'Apply' or 'Ok' anymore now, only 'Cancel', meaning you couldn't anymore make changes "stick" in deluge prefs menu, doh! Sorry about that. I fixed the additional issue, and rebuilt plugins from above and here's fixed versions, and again apologize for inconvenience and the oversight.

AutoRemovePlus-0.6.15-py3.9.egg (GTKUI prefs fix)

AutoRemovePlus-0.6.15-py3.9.egg (GTKUI prefs fix + thinclient fix)

AutoRemovePlus-0.6.15-py3.9.egg (GTKUI prefs fix + thinclient fix + finsihed-only mod)

Edit: I just noticed that in addition to the missing options, then also there is missing the option for selecting 'and', 'or' or 'xor', in the two conditions lower down i.e. the field/dropdown is empty, so don't know what it defaults too, as haven't tested it really. It was also like this in previous version I posted btw. I'm not good at fixing stuff like that unfortunetly, but did though make another post to springjools on his github to make note of these extra things.

Edit2: Okay got it fixed anyways, so now 'and/or' is available in GTKUI also, and working, but the 'xor' still misses though - It needed 4 changed lines and all credits again to tote94 as I gotten the correct code from analyzing his and checking error output.

AutoRemovePlus-0.6.15-py3.9.egg (GTKUI prefs fix)

AutoRemovePlus-0.6.15-py3.9.egg (GTKUI prefs fix + thinclient fix)

AutoRemovePlus-0.6.15-py3.9.egg (GTKUI prefs fix + thinclient fix + finsihed-only mod)

Edit3: Springjools replied he's very busy at work currently, but will look at it in weekend maybe, or when time allows :)

mhertz
Compulsive Poster
Compulsive Poster
Posts: 1090
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: [Plugin] Auto Remove Plus v0.6.1

Postby mhertz » Thu May 06, 2021 6:44 pm

I updated the 3 previous fixed builds of springjools fork to support labelplus instead of label plugin, which I saw requested previously here a few times before.

Note, I did only quick test by using a print statment to output the labelplus label so I could see it had worked, and I saw it got the label during manual labeling and auto'labeling, but not check anything else, i.e. sublabels or whatever named etc. I didn't bother change the debug-logging, which states "label plugin" in some of it's outputs, but these messages always refers to labelplus in these builds now however.

I originally didn't wanted do this, as I saw mgaulton's labelplus fork had support for adding labelplus labels to label plugin if enabled, so I thought people could just do that, but when I tested it(mgaulton's labelplus fork), then first there where error in the call for initializing the label plugin, which I fixed, and then the lower() function wasen't used correct either, which I then fixed and then lastly error'ed out in the call to label plugin for adding labelplus label, and where I finally thought f*** it, and might as well change directly to labelplus, so also not needing people have two plugins enabled just for that single function.

AutoRemovePlus-0.6.15-py3.9.egg (GTKUI prefs fix)

AutoRemovePlus-0.6.15-py3.9.egg (GTKUI prefs fix + thinclient fix)

AutoRemovePlus-0.6.15-py3.9.egg (GTKUI prefs fix + thinclient fix + finsihed-only mod)

Btw, I made a couple edits in previous post, if missed.


Return to “Plugins”

Who is online

Users browsing this forum: No registered users and 5 guests