Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deluge 2.0.5 Support #31

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:2.7.18-alpine3.11 AS base
FROM python:3.10-alpine3.15 AS base

RUN mkdir -p /usr/src/app
RUN mkdir -p /output
Expand Down
24 changes: 13 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@
#

from setuptools import setup, find_packages

__plugin_name__ = "Telegramer"
__author__ = "Noam"
__author_email__ = "[email protected]"
__version__ = "1.3.1"
__version__ = "2.0.5.0"
__url__ = "https://github.com/noam09"
__license__ = "GPLv3"
__description__ = "Control Deluge using Telegram"
Expand All @@ -68,14 +69,15 @@
long_description=__long_description__ if __long_description__ else __description__,
packages=packages,
package_data=__pkg_data__,
entry_points="""
[deluge.plugin.core]
%s = %s:CorePlugin
[deluge.plugin.gtkui]
%s = %s:GtkUIPlugin
[deluge.plugin.web]
%s = %s:WebUIPlugin
[telegramer.libpaths]
include = telegramer.include
""" % ((__plugin_name__, __plugin_name__.lower())*3)
entry_points="""[deluge.plugin.core]
%s = %s:CorePlugin
[deluge.plugin.gtkui]
%s = %s:GtkUIPlugin
[deluge.plugin.web]
%s = %s:WebUIPlugin
[deluge.plugin.gtk3ui]
%s = %s:Gtk3UIPlugin
[telegramer.libpaths]
include = telegramer.include
""" % ((__plugin_name__, __plugin_name__.lower())*4)
)
21 changes: 16 additions & 5 deletions telegramer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,29 +54,40 @@ def load_libs():
for name in egg.get_entry_map("telegramer.libpaths"):
ep = egg.get_entry_info("telegramer.libpaths", name)
location = "%s/%s" % (egg.location, ep.module_name.replace(".", "/"))
sys.path.append(location)
log.error("Appending to sys.path: '%s'" % location)
if location not in sys.path:
sys.path.append(location)
log.error("NOTANERROR: Appending to sys.path: '%s'" % location)


class CorePlugin(PluginInitBase):
def __init__(self, plugin_name):
load_libs()
from core import Core as _plugin_cls
from .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):
load_libs()
from gtkui import GtkUI as _plugin_cls
from .gtkui import GtkUI as _plugin_cls
self._plugin_cls = _plugin_cls
super(GtkUIPlugin, self).__init__(plugin_name)


class WebUIPlugin(PluginInitBase):
def __init__(self, plugin_name):
load_libs()
from webui import WebUI as _plugin_cls
from .webui import WebUI as _plugin_cls
self._plugin_cls = _plugin_cls
super(WebUIPlugin, self).__init__(plugin_name)


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


Loading