summaryrefslogtreecommitdiffstats
path: root/Plugins
diff options
context:
space:
mode:
Diffstat (limited to 'Plugins')
-rw-r--r--Plugins/Plugin.py12
-rw-r--r--Plugins/RapidshareCom.py8
2 files changed, 11 insertions, 9 deletions
diff --git a/Plugins/Plugin.py b/Plugins/Plugin.py
index 28de69928..c882c34bb 100644
--- a/Plugins/Plugin.py
+++ b/Plugins/Plugin.py
@@ -13,13 +13,13 @@ class Plugin():
self.config = {}
props = {}
props['name'] = "Base Plugin"
- props['pattern'] = None
- props['type'] = "hoster"
props['version'] = "0.1"
+ props['pattern'] = None
+ props['type'] = "hoster"
props['format'] = "*.py"
props['description'] = """bla"""
- props['author_name'] = ("RaNaN", "spoob")
- props['author_mail'] = ("RaNaN@pyload.org", "spoob@pyload.org")
+ props['author'] = "Spoob"
+ props['author_email'] = "nn@nn.de"
self.props = props
self.parent = parent
self.req = Request()
@@ -49,6 +49,7 @@ class Plugin():
"""
return self.parent.url
+
def get_file_name(self):
return re.findall("([^\/=]+)", self.parent.url)[-1]
@@ -72,7 +73,8 @@ 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, raw=True)
+ self.config[option] = self.parser.get(self.props['name'], option)
+ self.config[option] = False if self.config[option].lower() == 'false' else self.config[option]
def __call__(self):
return self.props['name']
diff --git a/Plugins/RapidshareCom.py b/Plugins/RapidshareCom.py
index 3af2333c8..ebe526903 100644
--- a/Plugins/RapidshareCom.py
+++ b/Plugins/RapidshareCom.py
@@ -28,7 +28,7 @@ class RapidshareCom(Plugin):
self.multi_dl = False
self.read_config()
- if self.config['premium'] == "True":
+ if self.config['premium']:
self.multi_dl = True
def set_parent_status(self):
@@ -65,7 +65,7 @@ class RapidshareCom(Plugin):
def get_wait_time(self):
- if self.config['premium'] == "True":
+ if self.config['premium']:
self.time_plus_wait = 0
return True
@@ -101,7 +101,7 @@ class RapidshareCom(Plugin):
def get_file_url(self):
""" returns the absolute downloadable filepath
"""
- if self.config['premium'] == "True":
+ if self.config['premium']:
return self.parent.url
if self.html[1] == None:
@@ -126,7 +126,7 @@ class RapidshareCom(Plugin):
def proceed(self, url, location):
- if self.config['premium'] == "True":
+ if self.config['premium']:
self.req.add_auth(self.config['username'], self.config['password'])
self.req.download(url, location)