springjools / deluge-autoremoveplus Goto Github PK
View Code? Open in Web Editor NEWThis project forked from omaralvarez/deluge-autoremoveplus
Auto removing of deluge torrents
This project forked from omaralvarez/deluge-autoremoveplus
Auto removing of deluge torrents
The plugin is failing to load on deluge 2.0.4dev20 running in the binhex/arch-delugevpn docker container. The deluged.log file contains:
08:17:46.651 [ERROR ][deluge.pluginmanagerbase :79 ] Unable to instantiate plugin 'AutoRemovePlus' from '/config/plugins/AutoRemovePlus.egg'! 08:17:46.652 [ERROR ][deluge.pluginmanagerbase :79 ] No module named 'past' Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/deluge/pluginmanagerbase.py", line 148, in enable_plugin instance = cls(plugin_name.replace('-', '_')) File "/config/plugins/AutoRemovePlus.egg/autoremoveplus/__init__.py", line 48, in __init__ from autoremoveplus.core import Core as _plugin_cls File "<frozen zipimport>", line 259, in load_module File "/config/plugins/AutoRemovePlus.egg/autoremoveplus/core.py", line 45, in <module> from past.utils import old_div ModuleNotFoundError: No module named 'past'
Seems to be a dependency issue with the python-future package
Error preventing removal. Not sure what to do.
Things I've tried:
Remove plugin and .conf files
Restart Deluge
Install Plugin fresh
Restart Deluge
Getting this error every time with latest version.
02:31:16.772 [INFO ][deluge.pluginmanagerbase :69 ] Plugin AutoRemovePlus enabled...
02:31:21.770 [INFO ][autoremoveplus.core :69 ] check interval loop starting
02:31:21.771 [INFO ][autoremoveplus.core :69 ] AutoRemovePlus: check do_remove
02:31:21.771 [ERROR ][autoremoveplus.core :79 ] Error reading config: could not convert string to float: ''
Trying to enable the plugin, I get the issue where ticking the checkbox appears to work until the preferences window is closed, but re-opening shows it ticked for a second and then it auto un-ticks.
Using Deluge Version 1.3.15
Will re-try later today with today's release and update.
I know this issue was mentioned in the omaralvarez repo in a random comment trail somewhere, but it's not here yet so here it is.
It is currently pausing and removing unfinished torrents.
I would find it useful to be able to extend (or disable) the pause/delete after seedtime options. The current maximum time of 9999 hours is just a little over a year. Could it be altered to either: a max of 99999 hours, or 9999 days, or allow -1 to disable the feature?
Upgraded from 0.6.14 to 0.6.15 and the plugin would not load... at least it no longer appeared in the WebUI.
Reverted to 0.6.14 and it's back and working again.
Can someone explain what I have set here? I want to make sure I understand this feature correctly.
What I am looking for is it to do this.
-Remove seeding torrents after 10 days
-If the drive space gets to 10 GB start removing seeding torrents by longest time seeding or by ratio
-If torrents are stale downloading - meaning no action just stuck - if availability under one and age in days is 5 stop downloading them and delete data
-Anytime anything is meeting criteria to remove, remove torrent and data whether its seeding or downloading.
I think my main question is - how do i set this so the drive doesnt fill up?
"Age in days" under specific rules is not comparing against days at all, it's comparing against Hours.
snip
I'm getting this message in the logs:
17:45:39 [INFO ][autoremoveplus.core :295 ] AutoRemovePlus: check do_remove
17:45:39 [ERROR ][autoremoveplus.core :333 ] Error reading config: unorderable types: str() > float()
This is my config:
{
"file": 1,
"format": 1
}{
"api_lidarr": "",
"api_radarr": "",
"api_sonarr": "",
"count_exempt": false,
"enable_lidarr": false,
"enable_radarr": false,
"enable_sonarr": false,
"enabled": true,
"filter": "func_ratio",
"filter2": "func_seed_time",
"hdd_space": -1.0,
"interval": 0.02,
"label_rules": {},
"labels": [],
"max_seeds": 0,
"min": 1.0,
"min2": 7.0,
"pause_seed": false,
"remove": true,
"remove_data": true,
"rule_1_enabled": true,
"rule_2_enabled": true,
"seedtime_limit": "1447",
"seedtime_pause": "1447",
"sel_func": "or",
"server_url": "",
"tracker_rules": {},
"trackers": []
}
I use this to first pause torrents and then manually remove paused torrents from sonarr/lidarr/radarr. I guess people have dozens of different uses for this plugin.
The removal or torrents/deleting torrents/data does work but it produces some error. I think the error somehow comes from the fact that something tries to delete the same torrent twice, and the second time is what causes the error and also makes deluge crash. The actual torrent is removed though, but not blacklisted to sonarr etc. The torrent state is also not updated so this still causes some future errors. Would be nice to fix this thing as well so that sonarr integration would work. Works using the command line.
Remove after seedtime (hours)
should have the option to also delete data on the disk. Add this feature, and I would say it's 100% towards my needs.
Thank you for fixing the last error with 0.6.9
I requested this feature on the original repo but it sadly didn't get implemented omaralvarez/deluge-autoremoveplus/issues/33
Would it be possible to allow for different seed times for different trackers and whether something is an episode or season? It could be done through file regex as well but sonarr api would help create less false positives.
So for example, an episode would have say 72 hours of seed time before being removed while a full season would have 5 days of seed time. Right now, all episodes and seasons have the same time.
Could you kindly please consider adding same change as the PR I just submitted against tote94's fork, thanks.
More info in the comment I made there, about why is important:
Thanks in advance.
Edit: I just noticed you already include correct lines later, but that first initial deprecated line would still be nice to get removed, as will still trip up in unofficial deluge2 installer for windows, plus from what I've read, likely also when official installer emerges, as seemingly pyinstaller freezed exe's have same issue.
How does the Media Server tab work? As I understand in the text there, it says:
"If the corresponding server is enabled, removing a torrent from deluge will also blacklist it from the upstream server, so that it's not downloaded again"
So when Sonarr/Radarr successfully completes a download it doesn't remove it from Deluge for seeding. Once autoremoveplus removes it, it blacklists it from Sonarr? Even though it technically is a valid download and that the only reason it was removed from Deluge is because it already met the criteria set in the autoremoveplus settings? I'm confused with this new feature.
Additional questions:
Sorry for being to lazy to make PR, but here's a diff patch for needed changes to get GTKUI preferences page to show and not output errors:
https://paste.c-net.org/OscarDivision
It's missing alot of options though currently, but better than nothing of-course.
I made builds including this, plus screenshots, and posted on the forum here:
https://forum.deluge-torrent.org/viewtopic.php?f=9&t=47243&start=210#p233413
Thanks again for your work.
15:52:00 [ERROR ][deluge.pluginmanagerbase :154 ] Unable to instantiate plugin 'AutoRemovePlus' from '/home/deluge/.config/deluge/plugins/AutoRemovePlus-0.6.6.egg'! 15:52:00 [ERROR ][deluge.pluginmanagerbase :1343] No module named 'past' Traceback (most recent call last): File "/usr/lib/python3/dist-packages/deluge/pluginmanagerbase.py", line 148, in enable_plugin instance = cls(plugin_name.replace('-', '_')) File "/home/deluge/.config/deluge/plugins/AutoRemovePlus-0.6.6.egg/autoremoveplus/__init__.py", line 48, in __init__ from autoremoveplus.core import Core as _plugin_cls File "/home/deluge/.config/deluge/plugins/AutoRemovePlus-0.6.6.egg/autoremoveplus/core.py", line 45, in <module> from past.utils import old_div ModuleNotFoundError: No module named 'past'
currently it is necessary to specify those not to be deleted, but the opposite would be good, specify the tracker to be deleted (for public trackers)
deluge-autoremoveplus/autoremoveplus/core.py
Line 618 in 5165e1f
Surely this should be:
if remove_cond and seed_remove_cond
Otherwise all other specific rules are not referenced at all
--- Nevermind.
Restarted container and it is fine now
Am I correct in understanding that currently there is no way to have finished torrents pause after seeding for a while and then get removed after some time? I tried to achieve this with both "time since completion" and "remove after seedtime" but nothing gets removed. I guess the second one is explained by #10 (comment), but why doesn't the first one work? Does enabling pause just completely cancel out removal options? The semantics of the interface are pretty unclear and even contradictory, it seems. Perhaps some documentation could be added?
I'm on deluge 2.0.3 with AutoRemovePlus-0.6.15
I would find it very useful to be able to remove torrents based on the length of time since last transfer.
Time since last transfer is shown in the torrent status in deluge v2+
As title, there's issue with this plugin, like tote94's fork likewise, because the usage of TorrentManager's get_status() deluge api-call returns cached libtorrent values by default, so please add 'update=True' to dynamic field requests of that call, thanks, as else needs GUI open to refresh these values, to correctly trigger conditions using such.
Thanks in advance.
https://forum.deluge-torrent.org/viewtopic.php?f=9&t=47243&p=233391#p233391
Did something change in python 3.8 in terms of the log module? I'm getting a lot of spam like this:
AFAICT it's the log module that's failing. Just posting this in case someone happens to be aware of this as well.
I'm using LSIO deluge container and I have the python3-requests module. But when I try to install using the webUI, I see the name of the egg as [object FileList] when I choose it. It's not working this way but when I manually install by copying to the plugins folder, it works just fine. So why can't we install using the UI?
The UI is not showing up in de sidebar on GTK and on Web UI. I can enable it, it creates a config. Nothing shows up in the logs.
GTK version: deluge-gtk 2.0.4.dev23
Web UI version: deluge-web 2.0.3-2-201906121747-ubuntu18.04.1
Hi Springjools,
Hope you're well!
I was wondering what happens when this addon is used in conjunction with any extractor addon. Can you set this up so that it also removes any extracted files (eg I want this addon to delete the entire folder contents)?
Thanks!
Max
Is this supported for python 3? I'm on Python 3.6.10 and tried compiling it with my pipx virtualenv I made for the latest dev version of deluge but got this error.
byte-compiling build/bdist.linux-x86_64/egg/autoremoveplus/gtkui.py to gtkui.cpython-36.pyc
File "build/bdist.linux-x86_64/egg/autoremoveplus/gtkui.py", line 147
def on_menu_show(menu, (menu_item, toggled)):
^
SyntaxError: invalid syntax
Similar issue here
Having an issue with the .egg install. Using delugevpn . Doesn't show up in Deluge after.
https://i.imgur.com/HO1qAiv.png
Byte-compiling build/bdist.linux-x86_64/egg/autoremoveplus/gtkui.py to gtkui.cpython-38.pyc
File "build/bdist.linux-x86_64/egg/autoremoveplus/gtkui.py", line 147
def on_menu_show(menu, (menu_item, toggled)):
^
SyntaxError: invalid syntaxbyte-compiling build/bdist.linux-x86_64/egg/autoremoveplus/mediaserver.py to mediaserver.cpython-38.pyc
byte-compiling build/bdist.linux-x86_64/egg/autoremoveplus/webui.py to webui.cpython-38.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
Originally posted by @exzacklyright in #3 (comment)
How can I help updated and expand the readme so the options and etc are clearer?
I am trying to set autoremoveplus to remove torrents when the following conditions are met:
Ratio > 1
Time Since last transfer > 72h
This is currently impossible since one of the settings is forced as "under" while the other is "over". In older version of this plugin the "min" value was used instead which made this possible.
One possible solution is to allow users to define what the criteria for "Pause" and "Remove". For example. instead of "Remove after seed time hours" being the default, allow us to change that to something else, like "Remove after x ratio". This would make this plugin a lot more flexible. As it currently stands I am forced to use the "Remove after seed time hours" option despite the fact that I don't always want to remove torrents that way.
Here is a picture of what the settings used to look like.
Environment : Owner@all4u:~# deluge -V
deluge 2.0.3
libtorrent: 1.1.13.0
Python: 3.8.2
OS: Linux Ubuntu 20.04 focal
Hi
When selecting a plugin, the following error message appears and the autoremoveplus interface is not displayed on the screen.
Thanks for helping
Owner@all4u:~# Unhandled error in Deferred:
Temporarily disabling observer LegacyLogObserverWrapper(<bound method TwistedLoggingObserver.emit of <deluge.log.TwistedLoggingObserver object at 0x7f6759b83310>>) due to exception: [Failure instance: Traceback: <class 'TypeError'>: _findCaller() takes from 1 to 2 positional arguments but 3 were given
/usr/lib/python3.8/json/encoder.py:253:iterencode
/usr/lib/python3/dist-packages/twisted/internet/defer.py:953:__del__
/usr/lib/python3/dist-packages/twisted/logger/_logger.py:270:critical
/usr/lib/python3/dist-packages/twisted/logger/_logger.py:144:emit
--- <exception caught here> ---
/usr/lib/python3/dist-packages/twisted/logger/_observer.py:131:__call__
/usr/lib/python3/dist-packages/twisted/logger/_legacy.py:93:__call__
/usr/lib/python3/dist-packages/deluge/log.py:208:emit
/usr/lib/python3/dist-packages/twisted/python/log.py:595:emit
/usr/lib/python3/dist-packages/twisted/logger/_legacy.py:154:publishToNewObserver
/usr/lib/python3/dist-packages/twisted/logger/_stdlib.py:115:__call__
/usr/lib/python3.8/logging/__init__.py:1500:log
/usr/lib/python3.8/logging/__init__.py:1565:_log
]
Traceback (most recent call last):
File "/usr/lib/python3.8/json/encoder.py", line 253, in iterencode
_iterencode = _make_iterencode(
File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 953, in __del__
log.critical("Unhandled error in Deferred:",
File "/usr/lib/python3/dist-packages/twisted/logger/_logger.py", line 270, in critical
self.emit(LogLevel.critical, format, **kwargs)
File "/usr/lib/python3/dist-packages/twisted/logger/_logger.py", line 144, in emit
self.observer(event)
--- <exception caught here> ---
File "/usr/lib/python3/dist-packages/twisted/logger/_observer.py", line 131, in __call__
observer(event)
File "/usr/lib/python3/dist-packages/twisted/logger/_legacy.py", line 93, in __call__
self.legacyObserver(event)
File "/usr/lib/python3/dist-packages/deluge/log.py", line 208, in emit
PythonLoggingObserver.emit(self, event_dict)
File "/usr/lib/python3/dist-packages/twisted/python/log.py", line 595, in emit
_publishNew(self._newObserver, eventDict, textFromEventDict)
File "/usr/lib/python3/dist-packages/twisted/logger/_legacy.py", line 154, in publishToNewObserver
observer(eventDict)
File "/usr/lib/python3/dist-packages/twisted/logger/_stdlib.py", line 115, in __call__
self.logger.log(
File "/usr/lib/python3.8/logging/__init__.py", line 1500, in log
self._log(level, msg, args, **kwargs)
File "/usr/lib/python3.8/logging/__init__.py", line 1565, in _log
fn, lno, func, sinfo = self.findCaller(stack_info, stacklevel)
builtins.TypeError: _findCaller() takes from 1 to 2 positional arguments but 3 were given
Hello
The issue is simple: The plugin will not load.
I updated to the latest version of linuxserver/deluge and downloaded the latest release from here, uploaded it in Deluge but the plugin will not load.
I've tried restarting, removing config files, removing plugin folder...
My deluge version: 2.0.3-2-201906121747-ubuntu18.04.1 running in Docker on unRAID
Screenshots:
It won't load in the Plugins window after restarting, the .egg is in the plugins directory.
This is all it says about plugins when loading:
16:41:05 [INFO][deluge.core.daemon :154 ] Deluge daemon starting...
16:41:05 [INFO][deluge.pluginmanagerbase :189 ] Plugin AutoAdd enabled...
16:41:05 [INFO][deluge_label.core :78 ] *** Start Label plugin ***
16:41:05 [INFO][deluge.pluginmanagerbase :189 ] Plugin Label enabled...
16:41:05 [INFO][deluge.pluginmanagerbase :189 ] Plugin Scheduler enabled...
it looks good, but it doesn't suppress any torrents.
the https://github.com/omaralvarez/deluge-autoremoveplus/files/3312651/AutoRemovePlus-0.6.2-py3.7.zip works well but I'd like with radarr/sonarr function
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.