Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 28 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@ AutoRemovePlus
==============

AutoRemovePlus is a plugin for [Deluge](http://deluge-torrent.org) that
you can use to automatically remove torrents. Its
based on AutoRemove 0.1 by Jamie Lennox.
you can use to automatically remove torrents. It's
based on AutoRemove 0.6.1 by Omar Alvarez, which in turn is based on 0.1 by Jamie Lennox.

This is a GtkUI and WebUI plugin.
This is a Gtk3UI and WebUI plugin. However, since there is not yet any gtk client for wndows for deluge 2.03, this part is currently untested.

New features:
-------------
- First condition is still a minimum, but the second condition is now maximum. Play with these to accomplish what you want
- New option that only applies to finished torrents: pause after hours, and remove after hours.
- Connection to sonarr/lidarr/radarr to blacklist torrent and make the remove through those clients instead. But currently causes http 500 error. Works from command line though.
- Cleaned up the inconsistent times from days and now it's in hours instead.

Features
--------
Expand All @@ -25,13 +32,9 @@ Features

Usage
-----
Look for torrents to remove every day:

> Check every: 1

Look for torrents to remove every hour:

> Check every: 0.0416
> Check every: 1

Remove every torrent that meets minimum criteria:

Expand All @@ -49,13 +52,9 @@ Only remove torrents when the main HDD has less than 10 GB free:

> Minimum HDD space: 10

Remove torrents that have a ratio over 2.0 and have been seeding for at least 4 days:

> Remove by: Ratio, Min: 2.0, and, Remove by: Seed Time, Min: 4
Remove torrents that have an availability under 1.0 and were added 4 days ago or more:

Remove torrents that have a ratio over 2.0 or have been seeding for at least 4 days:

> Remove by: Ratio, Min: 2.0, or, Remove by: Seed Time, Min: 4
> Remove by: Availability, Min: 1.0, and, Remove by: Age in days, Max: 4

Remove torrents only according to first criteria:

Expand All @@ -67,6 +66,21 @@ Pause torrents instead of removing them:

The rest of the options are pretty self explanatory

Command line usage
------------------
copy mediaserver.py to a folder of your liking and cd to it.

edit /data/server.ini to include the url of your server and api keys for sonarr/radarr/lidarr, can be found under
settings->general.

syntax:

python3 mediaserver sonarr queue
> returns sonarr queue

python3 mediaserver radarr delete --item=12345567
> deletes and blacklists that item and returns {} if successful

Building
--------

Expand Down
22 changes: 15 additions & 7 deletions autoremoveplus/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
#
# You should have received a copy of the GNU General Public License
# along with deluge. If not, write to:
# The Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor
# Boston, MA 02110-1301, USA.
# The Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor
# Boston, MA 02110-1301, USA.
#
# In addition, as a special exception, the copyright holders give
# permission to link the code of portions of this program with the OpenSSL
Expand All @@ -39,24 +39,32 @@
#

from deluge.plugins.init import PluginInitBase

import logging
log = logging.getLogger(__name__)

class CorePlugin(PluginInitBase):
def __init__(self, plugin_name):
from core import Core as _plugin_cls
log.debug("Initing: {}, {}".format(self,plugin_name))
from autoremoveplus.core import Core as _plugin_cls
self._plugin_cls = _plugin_cls
super(CorePlugin, self).__init__(plugin_name)


class GtkUIPlugin(PluginInitBase):
def __init__(self, plugin_name):
from gtkui import GtkUI as _plugin_cls
from autoremoveplus.gtkui import GtkUI as _plugin_cls
self._plugin_cls = _plugin_cls
super(GtkUIPlugin, self).__init__(plugin_name)

class Gtk3UIPlugin(PluginInitBase):
def __init__(self, plugin_name):
from autoremoveplus.gtk3ui import Gtk3UI as _plugin_cls
self._plugin_cls = _plugin_cls
super(Gtk3UIPlugin, self).__init__(plugin_name)


class WebUIPlugin(PluginInitBase):
def __init__(self, plugin_name):
from webui import WebUI as _plugin_cls
from autoremoveplus.webui import WebUI as _plugin_cls
self._plugin_cls = _plugin_cls
super(WebUIPlugin, self).__init__(plugin_name)
7 changes: 4 additions & 3 deletions autoremoveplus/common.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from __future__ import unicode_literals
#
# common.py
#
Expand All @@ -23,9 +24,9 @@
#
# You should have received a copy of the GNU General Public License
# along with deluge. If not, write to:
# The Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor
# Boston, MA 02110-1301, USA.
# The Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor
# Boston, MA 02110-1301, USA.
#
# In addition, as a special exception, the copyright holders give
# permission to link the code of portions of this program with the OpenSSL
Expand Down
Loading