diff options
Diffstat (limited to 'module/plugins')
| -rw-r--r-- | module/plugins/Account.py | 28 | ||||
| -rw-r--r-- | module/plugins/Addon.py (renamed from module/plugins/Hook.py) | 73 | ||||
| -rw-r--r-- | module/plugins/Base.py | 9 | ||||
| -rw-r--r-- | module/plugins/Crypter.py | 26 | ||||
| -rw-r--r-- | module/plugins/Hoster.py | 4 | ||||
| -rw-r--r-- | module/plugins/MultiHoster.py | 2 | ||||
| -rw-r--r-- | module/plugins/PluginManager.py | 16 | ||||
| -rw-r--r-- | module/plugins/addons/CaptchaTrader.py (renamed from module/plugins/hooks/CaptchaTrader.py) | 4 | ||||
| -rw-r--r-- | module/plugins/addons/ClickAndLoad.py (renamed from module/plugins/hooks/ClickAndLoad.py) | 4 | ||||
| -rw-r--r-- | module/plugins/addons/EasybytezCom.py (renamed from module/plugins/hooks/EasybytezCom.py) | 0 | ||||
| -rw-r--r-- | module/plugins/addons/Ev0InFetcher.py (renamed from module/plugins/hooks/Ev0InFetcher.py) | 4 | ||||
| -rw-r--r-- | module/plugins/addons/ExternalScripts.py (renamed from module/plugins/hooks/ExternalScripts.py) | 4 | ||||
| -rw-r--r-- | module/plugins/addons/ExtractArchive.py (renamed from module/plugins/hooks/ExtractArchive.py) | 4 | ||||
| -rw-r--r-- | module/plugins/addons/HotFolder.py (renamed from module/plugins/hooks/HotFolder.py) | 4 | ||||
| -rw-r--r-- | module/plugins/addons/IRCInterface.py (renamed from module/plugins/hooks/IRCInterface.py) | 6 | ||||
| -rw-r--r-- | module/plugins/addons/MergeFiles.py (renamed from module/plugins/hooks/MergeFiles.py) | 4 | ||||
| -rw-r--r-- | module/plugins/addons/MultiHome.py (renamed from module/plugins/hooks/MultiHome.py) | 4 | ||||
| -rw-r--r-- | module/plugins/addons/MultiHoster.py (renamed from module/plugins/hooks/MultiHoster.py) | 4 | ||||
| -rw-r--r-- | module/plugins/addons/MultishareCz.py (renamed from module/plugins/hooks/MultishareCz.py) | 0 | ||||
| -rw-r--r-- | module/plugins/addons/Premium4Me.py (renamed from module/plugins/hooks/Premium4Me.py) | 0 | ||||
| -rw-r--r-- | module/plugins/addons/RehostTo.py (renamed from module/plugins/hooks/RehostTo.py) | 0 | ||||
| -rw-r--r-- | module/plugins/addons/UpdateManager.py (renamed from module/plugins/hooks/UpdateManager.py) | 4 | ||||
| -rw-r--r-- | module/plugins/addons/XMPPInterface.py (renamed from module/plugins/hooks/XMPPInterface.py) | 2 | ||||
| -rw-r--r-- | module/plugins/addons/__init__.py (renamed from module/plugins/hooks/__init__.py) | 0 | ||||
| -rw-r--r-- | module/plugins/internal/AbstractExtractor.py | 2 | 
25 files changed, 126 insertions, 82 deletions
| diff --git a/module/plugins/Account.py b/module/plugins/Account.py index 323c8b545..28d1387fd 100644 --- a/module/plugins/Account.py +++ b/module/plugins/Account.py @@ -4,7 +4,7 @@ from time import time  from traceback import print_exc  from threading import RLock -from module.utils import compare_time, formatSize, parseFileSize, lock, from_string +from module.utils import compare_time, format_size, parseFileSize, lock, from_string  from module.Api import AccountInfo  from module.network.CookieJar import CookieJar @@ -23,11 +23,15 @@ class Account(Base, AccountInfo):      fields of AccountInfo ttype, and can be set easily at runtime.      """ +    # constants for special values +    UNKNOWN = -1 +    UNLIMITED = -2 +      # Default values      valid = True -    validuntil = None -    trafficleft = None -    maxtraffic = None +    validuntil = -1 +    trafficleft = -1 +    maxtraffic = -1      premium = True      activated = True @@ -39,7 +43,6 @@ class Account(Base, AccountInfo):      # known options      known_opt = ("time", "limitDL") -      def __init__(self, manager, loginname, password, options):          Base.__init__(self, manager.core) @@ -231,7 +234,7 @@ class Account(Base, AccountInfo):              except:                  self.logWarning(_("Your Time %s has wrong format, use: 1:22-3:44") % time_data) -        if 0 < self.validuntil < time(): +        if 0 <= self.validuntil < time():              return False          if self.trafficleft is 0:  # test explicity for 0              return False @@ -244,7 +247,7 @@ class Account(Base, AccountInfo):      def formatTrafficleft(self):          if self.trafficleft is None:              self.getAccountInfo(force=True) -        return formatSize(self.trafficleft*1024) +        return format_size(self.trafficleft*1024)      def wrongPassword(self):          raise WrongPassword @@ -257,12 +260,13 @@ class Account(Base, AccountInfo):          self.trafficleft = 0          self.scheduleRefresh(30 * 60) -    def expired(self, user): -        if user in self.infos: -            self.logWarning(_("Account %s is expired, checking again in 1h") % user) +    def expired(self, user=None): +        if user: self.logDebug("Deprecated argument user for .expired()", user) + +        self.logWarning(_("Account %s is expired, checking again in 1h") % user) -            self.validuntil = time() - 1 -            self.scheduleRefresh(60 * 60) +        self.validuntil = time() - 1 +        self.scheduleRefresh(60 * 60)      def scheduleRefresh(self, time=0, force=True):          """ add task to refresh account info to sheduler """ diff --git a/module/plugins/Hook.py b/module/plugins/Addon.py index 22765c525..fe9ae4817 100644 --- a/module/plugins/Hook.py +++ b/module/plugins/Addon.py @@ -28,35 +28,63 @@ def class_name(p):      return p.rpartition(".")[2]  class Expose(object): -    """ used for decoration to declare rpc services """ +    """ Used for decoration to declare rpc services. You can use any arbitrary method """      def __new__(cls, f, *args, **kwargs): -        hookManager.addRPC(class_name(f.__module__), f.func_name, f.func_doc) +        addonManager.addRPC(class_name(f.__module__), f.func_name, f.func_doc)          return f  def AddEventListener(event): -    """ used to register method for events """ +    """ Used to register method for events. Arguments needs to match parameter of event """      class _klass(object):          def __new__(cls, f, *args, **kwargs): -            hookManager.addEventListener(class_name(f.__module__), f.func_name, event) +            addonManager.addEventListener(class_name(f.__module__), f.func_name, event)              return f      return _klass -  class ConfigHandler(object): -    """ register method as config handler """ +    """ Register method as config handler. + +    Your method signature has to be: +        def foo(value=None): + +    value will be passed to use your method to set the config. +    When value is None your method needs to return an interaction task for configuration. +    """ +      def __new__(cls, f, *args, **kwargs): -        hookManager.addConfigHandler(class_name(f.__module__), f.func_name) +        addonManager.addConfigHandler(class_name(f.__module__), f.func_name)          return f +def FileHandler(desc, media, package=False): +    """ Register Handler for Files or packages. +    Depending on package=True the decorated method needs to accept pid or fid as argument + +    :param desc: verbose description +    :param media:  media type for which your method will be used +    :param package: True if it works on packages +    """ +    pass + +def AddonInfo(desc): +    """ Called to retrieve information about the current state. +    Decorated method must return anything convertable into string. + +    :param desc: verbose description +    """ +    pass +  def threaded(f):      #@wraps(f)      def run(*args,**kwargs): -        hookManager.startThread(f, *args, **kwargs) +        addonManager.startThread(f, *args, **kwargs)      return run -class Hook(Base): +class Addon(Base):      """ -    Base class for hook plugins. Please use @threaded decorator for all longer running task. +    Base class for addon plugins. Use @threaded decorator for all longer running task. + +    Decorate methods with @Expose, @AddventListener, @ConfigHandler +      """      #: automatically register event listeners for functions, attribute will be deleted dont use it yourself @@ -66,7 +94,6 @@ class Hook(Base):      #: List of events the plugin can handle, name the functions exactly like eventname.      event_list = None  # dont make duplicate entries in event_map -      #: periodic call interval in secondc      interval = 60 @@ -76,10 +103,10 @@ class Hook(Base):          #: Provide information in dict here, usable by API `getInfo`          self.info = None -        #: Callback of periodical job task, used by hookmanager +        #: Callback of periodical job task, used by addonmanager          self.cb = None -        #: `HookManager` +        #: `AddonManager`          self.manager = manager          #register events @@ -112,7 +139,7 @@ class Hook(Base):          try:              if self.isActivated(): self.periodical()          except Exception, e: -            self.core.log.error(_("Error executing hooks: %s") % str(e)) +            self.core.log.error(_("Error executing addons: %s") % str(e))              if self.core.debug:                  print_exc() @@ -120,10 +147,10 @@ class Hook(Base):      def __repr__(self): -        return "<Hook %s>" % self.__name__ +        return "<Addon %s>" % self.__name__      def isActivated(self): -        """ checks if hook is activated""" +        """ checks if addon is activated"""          return True if self.__internal__ else self.getConfig("activated")      def init(self): @@ -134,26 +161,26 @@ class Hook(Base):          pass      def activate(self): -        """  Used to activate the hook """ +        """  Used to activate the addon """          if has_method(self.__class__, "coreReady"): -            self.logDebug("Deprecated method .coreReady() use activated() instead") +            self.logDebug("Deprecated method .coreReady() use activate() instead")              self.coreReady()      def deactivate(self): -        """ Used to deactivate the hook. """ +        """ Used to deactivate the addon. """          pass      def periodical(self):          pass -    def newCaptchaTask(self, task): -        """ new captcha task for the plugin, it MUST set the handler and timeout or will be ignored """ +    def newInteractionTask(self, task): +        """ new interaction task for the plugin, it MUST set the handler and timeout or will be ignored """          pass -    def captchaCorrect(self, task): +    def taskCorrect(self, task):          pass -    def captchaInvalid(self, task): +    def taskInvalid(self, task):          pass      # public events starts from here diff --git a/module/plugins/Base.py b/module/plugins/Base.py index 29ff3a723..b846bbd60 100644 --- a/module/plugins/Base.py +++ b/module/plugins/Base.py @@ -39,7 +39,7 @@ class Base(object):      __version__ = "0.1"      #: Regexp pattern which will be matched for download/crypter plugins      __pattern__ = r"" -    #: Internal Hook plugin which is always loaded +    #: Internal addon plugin which is always loaded      __internal__ = False      #: Config definition: list of  (name, type, verbose_name, default_value) or      #: (name, type, verbose_name, short_description, default_value) @@ -50,7 +50,9 @@ class Base(object):      __long_description__ = """"""      #: List of needed modules      __dependencies__ = tuple() -    #: Tags to categorize the plugin +    #: Used to assign a category to addon plugins +    __category__ = "" +    #: Tags to categorize the plugin, see documentation for further info      __tags__ = tuple()      #: Base64 encoded .png icon, please don't use sizes above ~3KB      __icon__ = "" @@ -79,7 +81,7 @@ class Base(object):          #: :class:`EventManager`          self.evm = core.eventManager          #: :class:`InteractionManager` -        self.im = core.interActionManager +        self.im = core.interactionManager      def logInfo(self, *args, **kwargs):          """ Print args to log at specific level @@ -104,7 +106,6 @@ class Base(object):          else:              sep = " | " -          strings = []          for obj in args:              if type(obj) == unicode: diff --git a/module/plugins/Crypter.py b/module/plugins/Crypter.py index 6079ae8f6..15feea8e0 100644 --- a/module/plugins/Crypter.py +++ b/module/plugins/Crypter.py @@ -2,7 +2,6 @@  from traceback import print_exc -from module.Api import Destination  from module.common.packagetools import parseNames  from module.utils import to_list, has_method, uniqify  from module.utils.fs import exists, remove, fs_encode @@ -11,22 +10,33 @@ from Base import Base, Retry  class Package:      """ Container that indicates new package should be created """ -    def __init__(self, name, urls=None, dest=Destination.Queue): +    def __init__(self, name, urls=None):          self.name = name          self.urls = urls if urls else [] -        self.dest = dest +        # nested packages +        self.packs = [] -    def addUrl(self, url): +    def addURL(self, url):          self.urls.append(url) +    def addPackage(self, pack): +        self.packs.append(pack) + +    def getAllURLs(self): +        urls = self.urls +        for p in self.packs: +            urls.extend(p.getAllURLs()) +        return urls + +    # same name and urls is enough to be equal for packages      def __eq__(self, other):          return self.name == other.name and self.urls == other.urls      def __repr__(self): -        return u"<CrypterPackage name=%s, links=%s, dest=%s" % (self.name, self.urls, self.dest) +        return u"<CrypterPackage name=%s, links=%s, packs=%s" % (self.name, self.urls, self.packs)      def __hash__(self): -        return hash(self.name) ^ hash(frozenset(self.urls)) ^ hash(self.dest) +        return hash(self.name) ^ hash(frozenset(self.urls))  class PyFileMockup:      """ Legacy class needed by old crypter plugins """ @@ -64,7 +74,7 @@ class Crypter(Base):      @classmethod      def decrypt(cls, core, url_or_urls): -        """Static method to decrypt, something. Can be used by other plugins. +        """Static method to decrypt urls or content. Can be used by other plugins.          To decrypt file content prefix the string with ``CONTENT_PREFIX `` as seen above.          :param core: pyLoad `Core`, needed in decrypt context @@ -82,7 +92,7 @@ class Crypter(Base):          for url_or_pack in result:              if isinstance(url_or_pack, Package): #package -                ret.extend(url_or_pack.urls) +                ret.extend(url_or_pack.getAllURLs())              else: # single url                  ret.append(url_or_pack)          # eliminate duplicates diff --git a/module/plugins/Hoster.py b/module/plugins/Hoster.py index fc9e23132..32c587aa5 100644 --- a/module/plugins/Hoster.py +++ b/module/plugins/Hoster.py @@ -185,7 +185,7 @@ class Hoster(Base):          10 - not implemented          20 - unknown error          """ -        #@TODO checksum check hook +        #@TODO checksum check addon          return True, 10 @@ -365,7 +365,7 @@ class Hoster(Base):          filename = join(location, name) -        self.core.hookManager.dispatchEvent("downloadStarts", self.pyfile, url, filename) +        self.core.addonManager.dispatchEvent("downloadStarts", self.pyfile, url, filename)          try:              newname = self.req.httpDownload(url, filename, get=get, post=post, ref=ref, cookies=cookies, diff --git a/module/plugins/MultiHoster.py b/module/plugins/MultiHoster.py index abbc14466..1936478b4 100644 --- a/module/plugins/MultiHoster.py +++ b/module/plugins/MultiHoster.py @@ -15,7 +15,7 @@ class MultiHoster(Account):      """      Base class for MultiHoster services.      This is also an Account instance so you should see :class:`Account` and overwrite necessary methods. -    Multihoster becomes only active when an Account was entered and the MultiHoster hook was activated. +    Multihoster becomes only active when an Account was entered and the MultiHoster addon was activated.      You need to overwrite `loadHosterList` and a corresponding :class:`Hoster` plugin with the same name should      be available to make your service working.      """ diff --git a/module/plugins/PluginManager.py b/module/plugins/PluginManager.py index 4e2fa21ed..733cd2c5d 100644 --- a/module/plugins/PluginManager.py +++ b/module/plugins/PluginManager.py @@ -30,9 +30,11 @@ from module.plugins.Base import Base  from new_collections import namedtuple +#TODO: ignores not updatable +  # ignore these plugin configs, mainly because plugins were wiped out  IGNORE = ( -    "FreakshareNet", "SpeedManager", "ArchiveTo", "ShareCx", ('hooks', 'UnRar'), +    "FreakshareNet", "SpeedManager", "ArchiveTo", "ShareCx", ('addons', 'UnRar'),      'EasyShareCom', 'FlyshareCz'      ) @@ -41,7 +43,7 @@ PluginTuple = namedtuple("PluginTuple", "version re deps user path")  class PluginManager:      ROOT = "module.plugins."      USERROOT = "userplugins." -    TYPES = ("crypter", "hoster", "captcha", "accounts", "hooks", "internal") +    TYPES = ("crypter", "hoster", "accounts", "addons", "internal")      BUILTIN = re.compile(r'__(?P<attr>[a-z0-9_]+)__\s*=\s?(True|False|None|[0-9x.]+)', re.I)      SINGLE = re.compile(r'__(?P<attr>[a-z0-9_]+)__\s*=\s*(?:r|u|_)?((?:(?<!")"(?!")|\'|\().*(?:(?<!")"(?!")|\'|\)))', @@ -62,7 +64,7 @@ class PluginManager:          self.core.config.parseValues(self.core.config.PLUGIN) -        #register for import hook +        #register for import addon          sys.meta_path.append(self) @@ -191,7 +193,7 @@ class PluginManager:          if folder == "internal":              return plugin -        if folder == "hooks" and "config" not in attrs and not attrs.get("internal", False): +        if folder == "addons" and "config" not in attrs and not attrs.get("internal", False):              attrs["config"] = (["activated", "bool", "Activated", False],)          if "config" in attrs and attrs["config"]: @@ -204,7 +206,7 @@ class PluginManager:              else:                  config = [list(config)] -            if folder == "hooks" and not attrs.get("internal", False): +            if folder == "addons" and not attrs.get("internal", False):                  for item in config:                      if item[0] == "activated": break                  else: # activated flag missing @@ -362,8 +364,8 @@ class PluginManager:              else:                  as_dict[t] = [n] -        # we do not reload hooks or internals, would cause to much side effects -        if "hooks" in as_dict or "internal" in as_dict: +        # we do not reload addons or internals, would cause to much side effects +        if "addons" in as_dict or "internal" in as_dict:              return False          for type in as_dict.iterkeys(): diff --git a/module/plugins/hooks/CaptchaTrader.py b/module/plugins/addons/CaptchaTrader.py index 889eb83c0..b3374ec1d 100644 --- a/module/plugins/hooks/CaptchaTrader.py +++ b/module/plugins/addons/CaptchaTrader.py @@ -27,7 +27,7 @@ from pycurl import FORM_FILE, LOW_SPEED_TIME  from module.network.RequestFactory import getURL, getRequest  from module.network.HTTPRequest import BadHeader -from module.plugins.Hook import Hook +from module.plugins.Addon import Addon  PYLOAD_KEY = "9f65e7f381c3af2b076ea680ae96b0b7" @@ -44,7 +44,7 @@ class CaptchaTraderException(Exception):      def __repr__(self):          return "<CaptchaTraderException %s>" % self.err -class CaptchaTrader(Hook): +class CaptchaTrader(Addon):      __name__ = "CaptchaTrader"      __version__ = "0.13"      __description__ = """send captchas to captchatrader.com""" diff --git a/module/plugins/hooks/ClickAndLoad.py b/module/plugins/addons/ClickAndLoad.py index fc32d0da8..6d6928557 100644 --- a/module/plugins/hooks/ClickAndLoad.py +++ b/module/plugins/addons/ClickAndLoad.py @@ -21,9 +21,9 @@  import socket  import thread -from module.plugins.Hook import Hook +from module.plugins.Addon import Addon -class ClickAndLoad(Hook): +class ClickAndLoad(Addon):      __name__ = "ClickAndLoad"      __version__ = "0.2"      __description__ = """Gives abillity to use jd's click and load. depends on webinterface""" diff --git a/module/plugins/hooks/EasybytezCom.py b/module/plugins/addons/EasybytezCom.py index 4dd39cca6..4dd39cca6 100644 --- a/module/plugins/hooks/EasybytezCom.py +++ b/module/plugins/addons/EasybytezCom.py diff --git a/module/plugins/hooks/Ev0InFetcher.py b/module/plugins/addons/Ev0InFetcher.py index 0cd3f3226..aeb46320a 100644 --- a/module/plugins/hooks/Ev0InFetcher.py +++ b/module/plugins/addons/Ev0InFetcher.py @@ -18,9 +18,9 @@  from module.lib import feedparser  from time import mktime, time -from module.plugins.Hook import Hook +from module.plugins.Addon import Addon -class Ev0InFetcher(Hook): +class Ev0InFetcher(Addon):      __name__ = "Ev0InFetcher"      __version__ = "0.2"      __description__ = """checks rss feeds for ev0.in""" diff --git a/module/plugins/hooks/ExternalScripts.py b/module/plugins/addons/ExternalScripts.py index 39fe2b9f0..00fc7c114 100644 --- a/module/plugins/hooks/ExternalScripts.py +++ b/module/plugins/addons/ExternalScripts.py @@ -21,10 +21,10 @@ import subprocess  from os import access, X_OK, makedirs  from os.path import basename -from module.plugins.Hook import Hook +from module.plugins.Addon import Addon  from module.utils.fs import save_join, exists, join, listdir -class ExternalScripts(Hook): +class ExternalScripts(Addon):      __name__ = "ExternalScripts"      __version__ = "0.21"      __description__ = """Run external scripts""" diff --git a/module/plugins/hooks/ExtractArchive.py b/module/plugins/addons/ExtractArchive.py index 12bd40d1b..5f749ed0d 100644 --- a/module/plugins/hooks/ExtractArchive.py +++ b/module/plugins/addons/ExtractArchive.py @@ -49,10 +49,10 @@ if os.name != "nt":      from grp import getgrnam  from module.utils.fs import save_join, fs_encode, exists, remove, chmod, makedirs -from module.plugins.Hook import Hook, threaded, Expose +from module.plugins.Addon import Addon, threaded, Expose  from module.plugins.internal.AbstractExtractor import ArchiveError, CRCError, WrongPassword -class ExtractArchive(Hook): +class ExtractArchive(Addon):      """      Provides: unrarFinished (folder, filename)      """ diff --git a/module/plugins/hooks/HotFolder.py b/module/plugins/addons/HotFolder.py index ee1031ad5..d05026448 100644 --- a/module/plugins/hooks/HotFolder.py +++ b/module/plugins/addons/HotFolder.py @@ -26,9 +26,9 @@ from os.path import isfile  from shutil import move  import time -from module.plugins.Hook import Hook +from module.plugins.Addon import Addon -class HotFolder(Hook): +class HotFolder(Addon):      __name__ = "HotFolder"      __version__ = "0.1"      __description__ = """observe folder and file for changes and add container and links""" diff --git a/module/plugins/hooks/IRCInterface.py b/module/plugins/addons/IRCInterface.py index e2737dc3a..ddaa40613 100644 --- a/module/plugins/hooks/IRCInterface.py +++ b/module/plugins/addons/IRCInterface.py @@ -27,13 +27,13 @@ from time import sleep  from traceback import print_exc  import re -from module.plugins.Hook import Hook +from module.plugins.Addon import Addon  from module.network.RequestFactory import getURL  from module.utils import formatSize  from pycurl import FORM_FILE -class IRCInterface(Thread, Hook): +class IRCInterface(Thread, Addon):      __name__ = "IRCInterface"      __version__ = "0.1"      __description__ = """connect to irc and let owner perform different tasks""" @@ -52,7 +52,7 @@ class IRCInterface(Thread, Hook):      def __init__(self, core, manager):          Thread.__init__(self) -        Hook.__init__(self, core, manager) +        Addon.__init__(self, core, manager)          self.setDaemon(True)          #   self.sm = core.server_methods          self.api = core.api #todo, only use api diff --git a/module/plugins/hooks/MergeFiles.py b/module/plugins/addons/MergeFiles.py index 02d343096..48f997681 100644 --- a/module/plugins/hooks/MergeFiles.py +++ b/module/plugins/addons/MergeFiles.py @@ -24,11 +24,11 @@ import traceback  from os.path import join  from module.utils import save_join, fs_encode -from module.plugins.Hook import Hook +from module.plugins.Addon import Addon  BUFFER_SIZE = 4096 -class MergeFiles(Hook): +class MergeFiles(Addon):      __name__ = "MergeFiles"      __version__ = "0.1"      __description__ = "Merges parts splitted with hjsplit" diff --git a/module/plugins/hooks/MultiHome.py b/module/plugins/addons/MultiHome.py index f15148538..af3f55416 100644 --- a/module/plugins/hooks/MultiHome.py +++ b/module/plugins/addons/MultiHome.py @@ -17,10 +17,10 @@      @author: mkaay  """ -from module.plugins.Hook import Hook +from module.plugins.Addon import Addon  from time import time -class MultiHome(Hook): +class MultiHome(Addon):      __name__ = "MultiHome"      __version__ = "0.1"      __description__ = """ip address changer""" diff --git a/module/plugins/hooks/MultiHoster.py b/module/plugins/addons/MultiHoster.py index 2a567cce4..05d25b958 100644 --- a/module/plugins/hooks/MultiHoster.py +++ b/module/plugins/addons/MultiHoster.py @@ -5,10 +5,10 @@ import re  from types import MethodType  from module.plugins.MultiHoster import MultiHoster as MultiHosterAccount, normalize -from module.plugins.Hook import Hook, AddEventListener +from module.plugins.Addon import Addon, AddEventListener  from module.plugins.PluginManager import PluginTuple -class MultiHoster(Hook): +class MultiHoster(Addon):      __version__ = "0.1"      __internal__ = True      __description__ = "Gives ability to use MultiHoster services. You need to add your account first." diff --git a/module/plugins/hooks/MultishareCz.py b/module/plugins/addons/MultishareCz.py index a934f43ef..a934f43ef 100644 --- a/module/plugins/hooks/MultishareCz.py +++ b/module/plugins/addons/MultishareCz.py diff --git a/module/plugins/hooks/Premium4Me.py b/module/plugins/addons/Premium4Me.py index fc3ce2343..fc3ce2343 100644 --- a/module/plugins/hooks/Premium4Me.py +++ b/module/plugins/addons/Premium4Me.py diff --git a/module/plugins/hooks/RehostTo.py b/module/plugins/addons/RehostTo.py index b16987f5c..b16987f5c 100644 --- a/module/plugins/hooks/RehostTo.py +++ b/module/plugins/addons/RehostTo.py diff --git a/module/plugins/hooks/UpdateManager.py b/module/plugins/addons/UpdateManager.py index 230a6e858..5bc6ac447 100644 --- a/module/plugins/hooks/UpdateManager.py +++ b/module/plugins/addons/UpdateManager.py @@ -25,9 +25,9 @@ from time import time  from module.plugins.PluginManager import IGNORE  from module.network.RequestFactory import getURL -from module.plugins.Hook import threaded, Expose, Hook +from module.plugins.Addon import threaded, Expose, Addon -class UpdateManager(Hook): +class UpdateManager(Addon):      __name__ = "UpdateManager"      __version__ = "0.12"      __description__ = """checks for updates""" diff --git a/module/plugins/hooks/XMPPInterface.py b/module/plugins/addons/XMPPInterface.py index de87433cf..e8ef1d2ca 100644 --- a/module/plugins/hooks/XMPPInterface.py +++ b/module/plugins/addons/XMPPInterface.py @@ -24,7 +24,7 @@ from pyxmpp.jabber.client import JabberClient  from pyxmpp.interface import implements  from pyxmpp.interfaces import * -from module.plugins.hooks.IRCInterface import IRCInterface +from module.plugins.addons.IRCInterface import IRCInterface  class XMPPInterface(IRCInterface, JabberClient):      __name__ = "XMPPInterface" diff --git a/module/plugins/hooks/__init__.py b/module/plugins/addons/__init__.py index e69de29bb..e69de29bb 100644 --- a/module/plugins/hooks/__init__.py +++ b/module/plugins/addons/__init__.py diff --git a/module/plugins/internal/AbstractExtractor.py b/module/plugins/internal/AbstractExtractor.py index 2130f910e..ceb188193 100644 --- a/module/plugins/internal/AbstractExtractor.py +++ b/module/plugins/internal/AbstractExtractor.py @@ -30,7 +30,7 @@ class AbtractExtractor:      def __init__(self, m, file, out, fullpath, overwrite, renice):          """Initialize extractor for specific file -        :param m: ExtractArchive Hook plugin +        :param m: ExtractArchive Addon plugin          :param file: Absolute filepath          :param out: Absolute path to destination directory          :param fullpath: extract to fullpath | 
