Skip to content

Commit

Permalink
Basic Deluge 2.0.5 support
Browse files Browse the repository at this point in the history
  • Loading branch information
noam09 committed Mar 24, 2022
1 parent 72850d7 commit d694413
Show file tree
Hide file tree
Showing 876 changed files with 79,474 additions and 15,537 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9-alpine3.15 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__ = "2.0.0.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)
)
15 changes: 13 additions & 2 deletions telegramer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ 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):
Expand All @@ -80,3 +81,13 @@ def __init__(self, plugin_name):
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

0 comments on commit d694413

Please sign in to comment.