diff options
Diffstat (limited to 'module/plugins/hooks')
| -rw-r--r-- | module/plugins/hooks/AndroidPhoneNotify.py | 4 | ||||
| -rw-r--r-- | module/plugins/hooks/ExternalScripts.py | 6 | ||||
| -rw-r--r-- | module/plugins/hooks/ExtractArchive.py | 42 | ||||
| -rw-r--r-- | module/plugins/hooks/LinkdecrypterCom.py | 9 | ||||
| -rw-r--r-- | module/plugins/hooks/SkipRev.py | 4 | ||||
| -rw-r--r-- | module/plugins/hooks/UpdateManager.py | 4 | ||||
| -rw-r--r-- | module/plugins/hooks/WindowsPhoneToastNotify.py | 4 | 
7 files changed, 35 insertions, 38 deletions
| diff --git a/module/plugins/hooks/AndroidPhoneNotify.py b/module/plugins/hooks/AndroidPhoneNotify.py index 18e1cce66..fbc2acd5c 100644 --- a/module/plugins/hooks/AndroidPhoneNotify.py +++ b/module/plugins/hooks/AndroidPhoneNotify.py @@ -9,7 +9,7 @@ from module.plugins.Hook import Hook  class AndroidPhoneNotify(Hook):      __name__    = "AndroidPhoneNotify"      __type__    = "hook" -    __version__ = "0.02" +    __version__ = "0.03"      __config__ = [("apikey"         , "str" , "API key"                                  , ""   ),                    ("notifycaptcha"  , "bool", "Notify captcha request"                   , True ), @@ -51,7 +51,7 @@ class AndroidPhoneNotify(Hook):              self.notify(_("Package finished"), pypack.name) -    def allDownloadsProcessed(self, thread): +    def allDownloadsProcessed(self):          if not self.getConfig("notifyprocessed"):              return False diff --git a/module/plugins/hooks/ExternalScripts.py b/module/plugins/hooks/ExternalScripts.py index f4d2cb69c..b2b4548a2 100644 --- a/module/plugins/hooks/ExternalScripts.py +++ b/module/plugins/hooks/ExternalScripts.py @@ -13,7 +13,7 @@ from module.utils import save_join  class ExternalScripts(Hook):      __name__    = "ExternalScripts"      __type__    = "hook" -    __version__ = "0.26" +    __version__ = "0.27"      __config__ = [("activated", "bool", "Activated", True)] @@ -136,11 +136,11 @@ class ExternalScripts(Hook):              self.callScript(script) -    def allDownloadsFinished(self, thread): +    def allDownloadsFinished(self):          for script in chain(self.scripts['all_downloads_finished'], self.scripts['all_dls_finished']):              self.callScript(script) -    def allDownloadsProcessed(self, thread): +    def allDownloadsProcessed(self):          for script in chain(self.scripts['all_downloads_processed'], self.scripts['all_dls_processed']):              self.callScript(script) diff --git a/module/plugins/hooks/ExtractArchive.py b/module/plugins/hooks/ExtractArchive.py index 2e9efa2b0..bdbaf64af 100644 --- a/module/plugins/hooks/ExtractArchive.py +++ b/module/plugins/hooks/ExtractArchive.py @@ -58,7 +58,7 @@ from module.utils import save_join, uniqify  class ExtractArchive(Hook):      __name__    = "ExtractArchive"      __type__    = "hook" -    __version__ = "1.03" +    __version__ = "1.04"      __config__ = [("activated"    , "bool"  , "Activated"                                 , True                                                                     ),                    ("fullpath"     , "bool"  , "Extract full path"                         , True                                                                     ), @@ -158,7 +158,7 @@ class ExtractArchive(Hook):      @threaded -    def allDownloadsProcessed(self, thread): +    def allDownloadsProcessed(self):          local = copy(self.queue)          self.queue[:] = [] @@ -302,36 +302,36 @@ class ExtractArchive(Hook):          try:              progress  = lambda x: pyfile.setProgress(x) -            encrypted = False +            encrypted = True  #@TODO: set to `False`              passwords = self.getPasswords() -            try: -                self.logInfo(basename(plugin.file), "Verifying...") +            # try: +                # self.logInfo(basename(plugin.file), "Verifying...") -                tmp_password    = plugin.password -                plugin.password = ""  #: Force verifying without password +                # tmp_password    = plugin.password +                # plugin.password = ""  #: Force verifying without password -                plugin.verify() +                # plugin.verify() -            except PasswordError: -                encrypted = True +            # except PasswordError: +                # encrypted = True -            except CRCError: -                self.logWarning(basename(plugin.file), _("Archive damaged")) +            # except CRCError: +                # self.logWarning(basename(plugin.file), _("Archive damaged")) -                if not self.getConfig("repair"): -                    raise CRCError +                # if not self.getConfig("repair"): +                    # raise CRCError -                elif plugin.repair(): -                    self.logInfo(basename(plugin.file), _("Successfully repaired")) +                # elif plugin.repair(): +                    # self.logInfo(basename(plugin.file), _("Successfully repaired")) -                elif not self.getConfig("keepbroken"): -                    raise ArchiveError(_("Broken archive")) +                # elif not self.getConfig("keepbroken"): +                    # raise ArchiveError(_("Broken archive")) -                else: -                    self.logInfo(basename(plugin.file), _("All OK")) +                # else: +                    # self.logInfo(basename(plugin.file), _("All OK")) -            plugin.password = tmp_password +            # plugin.password = tmp_password              if not encrypted:                  plugin.extract(progress) diff --git a/module/plugins/hooks/LinkdecrypterCom.py b/module/plugins/hooks/LinkdecrypterCom.py index d4924a687..f85a598bc 100644 --- a/module/plugins/hooks/LinkdecrypterCom.py +++ b/module/plugins/hooks/LinkdecrypterCom.py @@ -8,7 +8,7 @@ from module.plugins.internal.MultiHook import MultiHook  class LinkdecrypterCom(MultiHook):      __name__    = "LinkdecrypterCom"      __type__    = "hook" -    __version__ = "1.01" +    __version__ = "1.02"      __config__ = [("pluginmode"    , "all;listed;unlisted", "Use for plugins"                     , "all"),                    ("pluginlist"    , "str"                , "Plugin list (comma separated)"       , ""   ), @@ -21,8 +21,5 @@ class LinkdecrypterCom(MultiHook):      def getCrypters(self): -        try: -            html = self.getURL("http://linkdecrypter.com/") -            return re.search(r'>Supported\(\d+\)</b>: <i>(.+?) \+ RSDF', html).group(1).split(', ') -        except Exception: -            return list() +        return re.search(r'>Supported\(\d+\)</b>: <i>(.[\w.\-, ]+)', +                         self.getURL("http://linkdecrypter.com/").replace("(g)", "")).group(1).split(', ') diff --git a/module/plugins/hooks/SkipRev.py b/module/plugins/hooks/SkipRev.py index 6b4e715da..51d385bb4 100644 --- a/module/plugins/hooks/SkipRev.py +++ b/module/plugins/hooks/SkipRev.py @@ -18,7 +18,7 @@ def _setup(self):  class SkipRev(Hook):      __name__    = "SkipRev"      __type__    = "hook" -    __version__ = "0.23" +    __version__ = "0.24"      __config__ = [("tokeep", "int", "Number of rev files to keep for package (-1 to auto)", -1)] @@ -34,7 +34,7 @@ class SkipRev(Hook):      def _pyname(self, pyfile):          if hasattr(pyfile.pluginmodule, "getInfo"): -            return next(getattr(pyfile.pluginmodule, "getInfo")([pyfile.url]))[0] +            return getattr(pyfile.pluginmodule, "getInfo")([pyfile.url]).next()[0]          else:              self.logWarning("Unable to grab file name")              return urlparse(unquote(pyfile.url)).path.split('/')[-1] diff --git a/module/plugins/hooks/UpdateManager.py b/module/plugins/hooks/UpdateManager.py index 03b9ba6a4..b6a8bac7c 100644 --- a/module/plugins/hooks/UpdateManager.py +++ b/module/plugins/hooks/UpdateManager.py @@ -16,14 +16,14 @@ from module.utils import save_join  class UpdateManager(Hook):      __name__    = "UpdateManager"      __type__    = "hook" -    __version__ = "0.42" +    __version__ = "0.43"      __config__ = [("activated"    , "bool"                         , "Activated"                                     , True              ),                    ("mode"         , "pyLoad + plugins;plugins only", "Check updates for"                             , "pyLoad + plugins"),                    ("interval"     , "int"                          , "Check interval in hours"                       , 8                 ),                    ("autorestart"  , "bool"                         , "Automatically restart pyLoad when required"    , True              ),                    ("reloadplugins", "bool"                         , "Monitor plugins for code changes in debug mode", True              ), -                  ("nodebugupdate", "bool"                         , "Don't check for updates in debug mode"         , True              )] +                  ("nodebugupdate", "bool"                         , "Don't check for updates in debug mode"         , False             )]      __description__ = """ Check for updates """      __license__     = "GPLv3" diff --git a/module/plugins/hooks/WindowsPhoneToastNotify.py b/module/plugins/hooks/WindowsPhoneToastNotify.py index 886d4ca6a..20686ee36 100644 --- a/module/plugins/hooks/WindowsPhoneToastNotify.py +++ b/module/plugins/hooks/WindowsPhoneToastNotify.py @@ -10,7 +10,7 @@ from module.plugins.Hook import Hook  class WindowsPhoneToastNotify(Hook):      __name__    = "WindowsPhoneToastNotify"      __type__    = "hook" -    __version__ = "0.04" +    __version__ = "0.05"      __config__ = [("id"             , "str" , "Push ID"                                  , ""   ),                    ("url"            , "str" , "Push url"                                 , ""   ), @@ -53,7 +53,7 @@ class WindowsPhoneToastNotify(Hook):              self.notify(_("Package finished"), pypack.name) -    def allDownloadsProcessed(self, thread): +    def allDownloadsProcessed(self):          if not self.getConfig("notifyprocessed"):              return False | 
