summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal/Base.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/internal/Base.py')
-rw-r--r--module/plugins/internal/Base.py41
1 files changed, 21 insertions, 20 deletions
diff --git a/module/plugins/internal/Base.py b/module/plugins/internal/Base.py
index 1262fce15..48b4ff237 100644
--- a/module/plugins/internal/Base.py
+++ b/module/plugins/internal/Base.py
@@ -37,8 +37,8 @@ def create_getInfo(klass):
class Base(Plugin):
__name__ = "Base"
__type__ = "base"
- __version__ = "0.16"
- __status__ = "testing"
+ __version__ = "0.17"
+ __status__ = "stable"
__pattern__ = r'^unmatchable$'
__config__ = [("activated" , "bool", "Activated" , True),
@@ -52,6 +52,24 @@ class Base(Plugin):
URL_REPLACEMENTS = []
+ @classmethod
+ def get_info(cls, url="", html=""):
+ url = fixurl(url, unquote=True)
+ info = {'name' : parse_name(url),
+ 'pattern': {},
+ 'size' : 0,
+ 'status' : 3 if url else 8,
+ 'url' : replace_patterns(url, cls.URL_REPLACEMENTS)}
+
+ try:
+ info['pattern'] = re.match(cls.__pattern__, url).groupdict()
+
+ except Exception:
+ pass
+
+ return info
+
+
def __init__(self, pyfile):
self._init(pyfile.m.core)
@@ -102,23 +120,6 @@ class Base(Plugin):
'msg' : msg})
- @classmethod
- def get_info(cls, url="", html=""):
- url = fixurl(url, unquote=True)
- info = {'name' : parse_name(url),
- 'pattern': {},
- 'size' : 0,
- 'status' : 3 if url else 8,
- 'url' : replace_patterns(url, cls.URL_REPLACEMENTS)}
-
- try:
- info['pattern'] = re.match(cls.__pattern__, url).groupdict()
- except Exception:
- pass
-
- return info
-
-
def init_base(self):
pass
@@ -158,8 +159,8 @@ class Base(Plugin):
self.req = self.pyload.requestFactory.getRequest(self.classname)
self.premium = False
- self.grab_info()
self.setup_base()
+ self.grab_info()
self.setup()