summaryrefslogtreecommitdiffstats
path: root/Plugins
diff options
context:
space:
mode:
Diffstat (limited to 'Plugins')
-rw-r--r--Plugins/Plugin.py12
-rw-r--r--Plugins/RapidshareCom.py15
2 files changed, 11 insertions, 16 deletions
diff --git a/Plugins/Plugin.py b/Plugins/Plugin.py
index 7b7bd1d7e..28de69928 100644
--- a/Plugins/Plugin.py
+++ b/Plugins/Plugin.py
@@ -9,18 +9,17 @@ from module.network.Request import Request
class Plugin():
def __init__(self, parent):
- self.plugin_name = "Base"
- self.plugin_pattern = None
- self.plugin_type = "hoster"
self.parser = ConfigParser.SafeConfigParser()
self.config = {}
props = {}
props['name'] = "Base Plugin"
+ props['pattern'] = None
+ props['type'] = "hoster"
props['version'] = "0.1"
props['format'] = "*.py"
props['description'] = """bla"""
- props['author'] = "Spoob"
- props['author_email'] = "nn@nn.de"
+ props['author_name'] = ("RaNaN", "spoob")
+ props['author_mail'] = ("RaNaN@pyload.org", "spoob@pyload.org")
self.props = props
self.parent = parent
self.req = Request()
@@ -50,7 +49,6 @@ class Plugin():
"""
return self.parent.url
-
def get_file_name(self):
return re.findall("([^\/=]+)", self.parent.url)[-1]
@@ -74,7 +72,7 @@ class Plugin():
if self.parser.has_section(self.props['name']):
for option in self.parser.options(self.props['name']):
- self.config[option] = self.parser.get(self.props['name'], option)
+ self.config[option] = self.parser.get(self.props['name'], option, raw=True)
def __call__(self):
return self.props['name']
diff --git a/Plugins/RapidshareCom.py b/Plugins/RapidshareCom.py
index df746cc3b..3af2333c8 100644
--- a/Plugins/RapidshareCom.py
+++ b/Plugins/RapidshareCom.py
@@ -28,10 +28,9 @@ class RapidshareCom(Plugin):
self.multi_dl = False
self.read_config()
-
- if bool(self.config['premium']):
+ if self.config['premium'] == "True":
self.multi_dl = True
-
+
def set_parent_status(self):
""" sets all available Statusinfos about a File in self.parent.status
"""
@@ -64,10 +63,9 @@ class RapidshareCom(Plugin):
self.html_old = time()
self.get_wait_time()
-
def get_wait_time(self):
- if bool(self.config['premium']):
+ if self.config['premium'] == "True":
self.time_plus_wait = 0
return True
@@ -103,7 +101,7 @@ class RapidshareCom(Plugin):
def get_file_url(self):
""" returns the absolute downloadable filepath
"""
- if bool(self.config['premium']):
+ if self.config['premium'] == "True":
return self.parent.url
if self.html[1] == None:
@@ -128,8 +126,7 @@ class RapidshareCom(Plugin):
def proceed(self, url, location):
- if bool(self.config['premium']):
- self.req.add_auth(self.config['user'], self.config['pw'])
-
+ if self.config['premium'] == "True":
+ self.req.add_auth(self.config['username'], self.config['password'])
self.req.download(url, location)