summaryrefslogtreecommitdiffstats
path: root/pyload/plugin
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-04-13 17:34:59 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-04-13 17:34:59 +0200
commit2db634796bd5426c11f7849ce480265091f128c8 (patch)
tree5a54f7535e9c0ff1ec65f05f347b6eafbb496922 /pyload/plugin
parentCleanup (diff)
downloadpyload-2db634796bd5426c11f7849ce480265091f128c8.tar.xz
Cleanup (2)
Diffstat (limited to 'pyload/plugin')
-rw-r--r--pyload/plugin/Account.py6
-rw-r--r--pyload/plugin/Extractor.py8
-rw-r--r--pyload/plugin/addon/AndroidPhoneNotify.py2
-rw-r--r--pyload/plugin/addon/AntiVirus.py2
-rw-r--r--pyload/plugin/addon/ClickNLoad.py4
-rw-r--r--pyload/plugin/addon/DeleteFinished.py2
-rw-r--r--pyload/plugin/addon/ExtractArchive.py10
-rw-r--r--pyload/plugin/addon/MergeFiles.py2
-rw-r--r--pyload/plugin/addon/SkipRev.py2
-rw-r--r--pyload/plugin/addon/UpdateManager.py9
-rw-r--r--pyload/plugin/addon/WindowsPhoneNotify.py2
-rw-r--r--pyload/plugin/extractor/SevenZip.py2
-rw-r--r--pyload/plugin/extractor/UnRar.py4
-rw-r--r--pyload/plugin/extractor/UnZip.py2
-rw-r--r--pyload/plugin/hook/BypassCaptcha.py2
-rw-r--r--pyload/plugin/hook/Captcha9Kw.py2
-rw-r--r--pyload/plugin/hook/CaptchaBrotherhood.py2
-rw-r--r--pyload/plugin/hook/DeathByCaptcha.py2
-rw-r--r--pyload/plugin/hook/ExpertDecoders.py2
-rw-r--r--pyload/plugin/hook/ImageTyperz.py2
-rw-r--r--pyload/plugin/hoster/LinksnappyCom.py2
-rw-r--r--pyload/plugin/hoster/ShareonlineBiz.py2
-rw-r--r--pyload/plugin/hoster/UploadedTo.py2
-rw-r--r--pyload/plugin/hoster/WebshareCz.py2
-rw-r--r--pyload/plugin/hoster/ZDF.py6
-rw-r--r--pyload/plugin/internal/BasePlugin.py2
-rw-r--r--pyload/plugin/internal/DeadCrypter.py2
-rw-r--r--pyload/plugin/internal/DeadHoster.py2
-rw-r--r--pyload/plugin/internal/SimpleHoster.py8
29 files changed, 6 insertions, 91 deletions
diff --git a/pyload/plugin/Account.py b/pyload/plugin/Account.py
index 09dd90ad0..6a3eddc5b 100644
--- a/pyload/plugin/Account.py
+++ b/pyload/plugin/Account.py
@@ -63,8 +63,6 @@ class Account(Base):
@lock
-
-
def _login(self, user, data):
# set timestamp for login
self.timestamps[user] = time()
@@ -139,8 +137,6 @@ class Account(Base):
@lock
-
-
def getAccountInfo(self, name, force=False):
"""retrieve account infos for an user, do **not** overwrite this method!\\
just use it to retrieve infos in hoster plugins. see `loadAccountInfo`
@@ -299,8 +295,6 @@ class Account(Base):
@lock
-
-
def checkLogin(self, user):
""" checks if user is still logged in """
if user in self.timestamps:
diff --git a/pyload/plugin/Extractor.py b/pyload/plugin/Extractor.py
index decb332fd..c0948c3dd 100644
--- a/pyload/plugin/Extractor.py
+++ b/pyload/plugin/Extractor.py
@@ -36,23 +36,17 @@ class Extractor:
@classmethod
-
-
def isArchive(cls, filename):
name = os.path.basename(filename).lower()
return any(name.endswith(ext) for ext in cls.EXTENSIONS)
@classmethod
-
-
def isMultipart(cls, filename):
return False
@classmethod
-
-
def isUsable(cls):
""" Check if system statisfy dependencies
:return: boolean
@@ -61,8 +55,6 @@ class Extractor:
@classmethod
-
-
def getTargets(cls, files_ids):
""" Filter suited targets from list of filename id tuple list
:param files_ids: List of filepathes
diff --git a/pyload/plugin/addon/AndroidPhoneNotify.py b/pyload/plugin/addon/AndroidPhoneNotify.py
index 3fb291e11..8332f668d 100644
--- a/pyload/plugin/addon/AndroidPhoneNotify.py
+++ b/pyload/plugin/addon/AndroidPhoneNotify.py
@@ -75,8 +75,6 @@ class AndroidPhoneNotify(Addon):
@Expose
-
-
def notify(self,
event,
msg="",
diff --git a/pyload/plugin/addon/AntiVirus.py b/pyload/plugin/addon/AntiVirus.py
index c6628a684..3866014ee 100644
--- a/pyload/plugin/addon/AntiVirus.py
+++ b/pyload/plugin/addon/AntiVirus.py
@@ -43,8 +43,6 @@ class AntiVirus(Addon):
@Expose
@threaded
-
-
def scan(self, pyfile, thread):
file = fs_encode(pyfile.plugin.lastDownload)
filename = os.path.basename(pyfile.plugin.lastDownload)
diff --git a/pyload/plugin/addon/ClickNLoad.py b/pyload/plugin/addon/ClickNLoad.py
index 6a3d5d662..b6448598a 100644
--- a/pyload/plugin/addon/ClickNLoad.py
+++ b/pyload/plugin/addon/ClickNLoad.py
@@ -48,8 +48,6 @@ class ClickNLoad(Addon):
@threaded
-
-
def proxy(self, ip, webport, cnlport):
time.sleep(10) #@TODO: Remove in 0.4.10 (implement addon delay on startup)
@@ -63,8 +61,6 @@ class ClickNLoad(Addon):
@threaded
-
-
def _server(self, ip, webport, cnlport):
try:
dock_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
diff --git a/pyload/plugin/addon/DeleteFinished.py b/pyload/plugin/addon/DeleteFinished.py
index c0a2e8752..b9368a642 100644
--- a/pyload/plugin/addon/DeleteFinished.py
+++ b/pyload/plugin/addon/DeleteFinished.py
@@ -60,9 +60,9 @@ class DeleteFinished(Addon):
## own methods ##
- @style.queue
+ @style.queue
def deleteFinished(self, mode):
self.c.execute('DELETE FROM packages WHERE NOT EXISTS(SELECT 1 FROM links WHERE package=packages.id AND status NOT IN (%s))' % mode)
self.c.execute('DELETE FROM links WHERE NOT EXISTS(SELECT 1 FROM packages WHERE id=links.package)')
diff --git a/pyload/plugin/addon/ExtractArchive.py b/pyload/plugin/addon/ExtractArchive.py
index a52b55f0a..b2eeec1a3 100644
--- a/pyload/plugin/addon/ExtractArchive.py
+++ b/pyload/plugin/addon/ExtractArchive.py
@@ -193,8 +193,6 @@ class ExtractArchive(Addon):
@threaded
-
-
def extractQueued(self, thread):
packages = self.queue.get()
while packages:
@@ -211,8 +209,6 @@ class ExtractArchive(Addon):
@Expose
-
-
def extractPackage(self, *ids):
""" Extract packages with given id"""
for id in ids:
@@ -238,8 +234,6 @@ class ExtractArchive(Addon):
@Expose
-
-
def extract(self, ids, thread=None): #@TODO: Use pypack, not pid to improve method usability
if not ids:
return False
@@ -512,8 +506,6 @@ class ExtractArchive(Addon):
@Expose
-
-
def getPasswords(self, reload=True):
""" List of saved passwords """
if reload:
@@ -539,8 +531,6 @@ class ExtractArchive(Addon):
@Expose
-
-
def addPassword(self, password):
""" Adds a password to saved list"""
try:
diff --git a/pyload/plugin/addon/MergeFiles.py b/pyload/plugin/addon/MergeFiles.py
index e7da4a82a..dfc5f41d4 100644
--- a/pyload/plugin/addon/MergeFiles.py
+++ b/pyload/plugin/addon/MergeFiles.py
@@ -26,8 +26,6 @@ class MergeFiles(Addon):
@threaded
-
-
def packageFinished(self, pack):
files = {}
fid_dict = {}
diff --git a/pyload/plugin/addon/SkipRev.py b/pyload/plugin/addon/SkipRev.py
index e55d98056..5209da615 100644
--- a/pyload/plugin/addon/SkipRev.py
+++ b/pyload/plugin/addon/SkipRev.py
@@ -25,8 +25,6 @@ class SkipRev(Addon):
@staticmethod
-
-
def _setup(self):
self.pyfile.plugin._setup()
if self.pyfile.hasStatus("skipped"):
diff --git a/pyload/plugin/addon/UpdateManager.py b/pyload/plugin/addon/UpdateManager.py
index c7c7ec047..c7fb27a3d 100644
--- a/pyload/plugin/addon/UpdateManager.py
+++ b/pyload/plugin/addon/UpdateManager.py
@@ -82,9 +82,8 @@ class UpdateManager(Addon):
and time.time() - max(self.MIN_CHECK_INTERVAL, self.getConfig('checkinterval') * 60 * 60) > self.info['last_check']:
self.update()
- @Expose
-
+ @Expose
def autoreloadPlugins(self):
""" reload and reindex all modified plugins """
modules = filter(
@@ -121,10 +120,9 @@ class UpdateManager(Addon):
except Exception:
self.logWarning(_("Unable to retrieve server to get updates"))
+
@Expose
@threaded
-
-
def update(self):
""" check for updates """
@@ -275,9 +273,8 @@ class UpdateManager(Addon):
# 2 = Plugins updated, but restart required
return exitcode
- @Expose
-
+ @Expose
def removePlugins(self, type_plugins):
""" delete plugins from disk """
diff --git a/pyload/plugin/addon/WindowsPhoneNotify.py b/pyload/plugin/addon/WindowsPhoneNotify.py
index f7a5e6ec1..b1d1c8b0f 100644
--- a/pyload/plugin/addon/WindowsPhoneNotify.py
+++ b/pyload/plugin/addon/WindowsPhoneNotify.py
@@ -82,8 +82,6 @@ class WindowsPhoneNotify(Addon):
@Expose
-
-
def notify(self,
event,
msg="",
diff --git a/pyload/plugin/extractor/SevenZip.py b/pyload/plugin/extractor/SevenZip.py
index 7cf6aee35..b6d86adab 100644
--- a/pyload/plugin/extractor/SevenZip.py
+++ b/pyload/plugin/extractor/SevenZip.py
@@ -38,8 +38,6 @@ class SevenZip(UnRar):
@classmethod
-
-
def isUsable(cls):
if os.name == "nt":
cls.CMD = os.path.join(pypath, "7z.exe")
diff --git a/pyload/plugin/extractor/UnRar.py b/pyload/plugin/extractor/UnRar.py
index 32d33bc51..cad58ff4f 100644
--- a/pyload/plugin/extractor/UnRar.py
+++ b/pyload/plugin/extractor/UnRar.py
@@ -49,8 +49,6 @@ class UnRar(Extractor):
@classmethod
-
-
def isUsable(cls):
if os.name == "nt":
try:
@@ -82,8 +80,6 @@ class UnRar(Extractor):
@classmethod
-
-
def isMultipart(cls, filename):
return True if cls.re_multipart.search(filename) else False
diff --git a/pyload/plugin/extractor/UnZip.py b/pyload/plugin/extractor/UnZip.py
index 5e93064c2..b4fa637f0 100644
--- a/pyload/plugin/extractor/UnZip.py
+++ b/pyload/plugin/extractor/UnZip.py
@@ -25,8 +25,6 @@ class UnZip(Extractor):
@classmethod
-
-
def isUsable(cls):
return sys.version_info[:2] >= (2, 6)
diff --git a/pyload/plugin/hook/BypassCaptcha.py b/pyload/plugin/hook/BypassCaptcha.py
index 01359f3d3..141ac7282 100644
--- a/pyload/plugin/hook/BypassCaptcha.py
+++ b/pyload/plugin/hook/BypassCaptcha.py
@@ -123,8 +123,6 @@ class BypassCaptcha(Hook):
@threaded
-
-
def _processCaptcha(self, task):
c = task.captchaFile
try:
diff --git a/pyload/plugin/hook/Captcha9Kw.py b/pyload/plugin/hook/Captcha9Kw.py
index b388de444..9cb8e7928 100644
--- a/pyload/plugin/hook/Captcha9Kw.py
+++ b/pyload/plugin/hook/Captcha9Kw.py
@@ -61,8 +61,6 @@ class Captcha9kw(Hook):
@threaded
-
-
def _processCaptcha(self, task):
try:
with open(task.captchaFile, 'rb') as f:
diff --git a/pyload/plugin/hook/CaptchaBrotherhood.py b/pyload/plugin/hook/CaptchaBrotherhood.py
index a4a461517..eff005d14 100644
--- a/pyload/plugin/hook/CaptchaBrotherhood.py
+++ b/pyload/plugin/hook/CaptchaBrotherhood.py
@@ -160,8 +160,6 @@ class CaptchaBrotherhood(Hook):
@threaded
-
-
def _processCaptcha(self, task):
c = task.captchaFile
try:
diff --git a/pyload/plugin/hook/DeathByCaptcha.py b/pyload/plugin/hook/DeathByCaptcha.py
index 3688a68d0..4b77c8718 100644
--- a/pyload/plugin/hook/DeathByCaptcha.py
+++ b/pyload/plugin/hook/DeathByCaptcha.py
@@ -206,8 +206,6 @@ class DeathByCaptcha(Hook):
@threaded
-
-
def _processCaptcha(self, task):
c = task.captchaFile
try:
diff --git a/pyload/plugin/hook/ExpertDecoders.py b/pyload/plugin/hook/ExpertDecoders.py
index b34309d25..2e2982d2d 100644
--- a/pyload/plugin/hook/ExpertDecoders.py
+++ b/pyload/plugin/hook/ExpertDecoders.py
@@ -46,8 +46,6 @@ class ExpertDecoders(Hook):
@threaded
-
-
def _processCaptcha(self, task):
task.data['ticket'] = ticket = uuid4()
result = None
diff --git a/pyload/plugin/hook/ImageTyperz.py b/pyload/plugin/hook/ImageTyperz.py
index 717077790..ca5e02559 100644
--- a/pyload/plugin/hook/ImageTyperz.py
+++ b/pyload/plugin/hook/ImageTyperz.py
@@ -141,8 +141,6 @@ class ImageTyperz(Hook):
@threaded
-
-
def _processCaptcha(self, task):
c = task.captchaFile
try:
diff --git a/pyload/plugin/hoster/LinksnappyCom.py b/pyload/plugin/hoster/LinksnappyCom.py
index 3f2cf9821..2cb14dd51 100644
--- a/pyload/plugin/hoster/LinksnappyCom.py
+++ b/pyload/plugin/hoster/LinksnappyCom.py
@@ -51,8 +51,6 @@ class LinksnappyCom(MultiHoster):
@staticmethod
-
-
def _get_host(url):
host = urlsplit(url).netloc
return re.search(r'[\w-]+\.\w+$', host).group(0)
diff --git a/pyload/plugin/hoster/ShareonlineBiz.py b/pyload/plugin/hoster/ShareonlineBiz.py
index 608ee73b3..dcdeca168 100644
--- a/pyload/plugin/hoster/ShareonlineBiz.py
+++ b/pyload/plugin/hoster/ShareonlineBiz.py
@@ -37,8 +37,6 @@ class ShareonlineBiz(SimpleHoster):
@classmethod
-
-
def getInfo(cls, url="", html=""):
info = {'name': urlparse(unquote(url)).path.split('/')[-1] or _("Unknown"), 'size': 0, 'status': 3 if url else 1, 'url': url}
diff --git a/pyload/plugin/hoster/UploadedTo.py b/pyload/plugin/hoster/UploadedTo.py
index 7660ec3ad..7031d0ab2 100644
--- a/pyload/plugin/hoster/UploadedTo.py
+++ b/pyload/plugin/hoster/UploadedTo.py
@@ -32,8 +32,6 @@ class UploadedTo(SimpleHoster):
@classmethod
-
-
def apiInfo(cls, url="", get={}, post={}):
info = super(UploadedTo, cls).apiInfo(url)
diff --git a/pyload/plugin/hoster/WebshareCz.py b/pyload/plugin/hoster/WebshareCz.py
index 673dfaac5..11b7b37b0 100644
--- a/pyload/plugin/hoster/WebshareCz.py
+++ b/pyload/plugin/hoster/WebshareCz.py
@@ -21,8 +21,6 @@ class WebshareCz(SimpleHoster):
@classmethod
-
-
def getInfo(cls, url="", html=""):
info = super(WebshareCz, cls).getInfo(url, html)
diff --git a/pyload/plugin/hoster/ZDF.py b/pyload/plugin/hoster/ZDF.py
index 6f17df61a..c02eadc23 100644
--- a/pyload/plugin/hoster/ZDF.py
+++ b/pyload/plugin/hoster/ZDF.py
@@ -23,8 +23,6 @@ class ZDF(Hoster):
@staticmethod
-
-
def video_key(video):
return (
int(video.findtext("videoBitrate", "0")),
@@ -33,16 +31,12 @@ class ZDF(Hoster):
@staticmethod
-
-
def video_valid(video):
return video.findtext("url").startswith("http") and video.findtext("url").endswith(".mp4") and \
video.findtext("facets/facet").startswith("progressive")
@staticmethod
-
-
def get_id(url):
return int(re.search(r"\D*(\d{4,})\D*", url).group(1))
diff --git a/pyload/plugin/internal/BasePlugin.py b/pyload/plugin/internal/BasePlugin.py
index 1ddfee122..996dc8e76 100644
--- a/pyload/plugin/internal/BasePlugin.py
+++ b/pyload/plugin/internal/BasePlugin.py
@@ -24,8 +24,6 @@ class BasePlugin(Hoster):
@classmethod
-
-
def getInfo(cls, url="", html=""): #@TODO: Move to hoster class in 0.4.10
url = unquote(url)
url_p = urlparse(url)
diff --git a/pyload/plugin/internal/DeadCrypter.py b/pyload/plugin/internal/DeadCrypter.py
index c66a1b5e3..daa7e1a0d 100644
--- a/pyload/plugin/internal/DeadCrypter.py
+++ b/pyload/plugin/internal/DeadCrypter.py
@@ -16,8 +16,6 @@ class DeadCrypter(_Crypter):
@classmethod
-
-
def apiInfo(cls, url="", get={}, post={}):
api = super(DeadCrypter, self).apiInfo(url, get, post)
api['status'] = 1
diff --git a/pyload/plugin/internal/DeadHoster.py b/pyload/plugin/internal/DeadHoster.py
index 5f00d0128..2e57decdb 100644
--- a/pyload/plugin/internal/DeadHoster.py
+++ b/pyload/plugin/internal/DeadHoster.py
@@ -16,8 +16,6 @@ class DeadHoster(_Hoster):
@classmethod
-
-
def apiInfo(cls, url="", get={}, post={}):
api = super(DeadHoster, self).apiInfo(url, get, post)
api['status'] = 1
diff --git a/pyload/plugin/internal/SimpleHoster.py b/pyload/plugin/internal/SimpleHoster.py
index b32cb60c0..9fe5b1260 100644
--- a/pyload/plugin/internal/SimpleHoster.py
+++ b/pyload/plugin/internal/SimpleHoster.py
@@ -311,16 +311,13 @@ class SimpleHoster(Hoster):
@classmethod
-
-
def parseInfos(cls, urls): #@TODO: Built-in in 0.4.10 core (remove from plugins)
for url in urls:
url = replace_patterns(url, cls.URL_REPLACEMENTS)
yield cls.getInfo(url)
- @classmethod
-
+ @classmethod
def apiInfo(cls, url="", get={}, post={}):
url = urllib.unquote(url)
url_p = urlparse.urlparse(url)
@@ -331,9 +328,8 @@ class SimpleHoster(Hoster):
'status': 3 if url else 8,
'url': url}
- @classmethod
-
+ @classmethod
def getInfo(cls, url="", html=""):
info = cls.apiInfo(url)
online = False if info['status'] != 2 else True