summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
authorGravatar X3n0m0rph59 <X3n0m0rph59@googlemail.com> 2012-04-22 19:56:17 +0200
committerGravatar X3n0m0rph59 <X3n0m0rph59@googlemail.com> 2012-04-22 19:56:17 +0200
commitb40b32ee05f611323a7827fad2a25fa0a28dcb24 (patch)
tree60f7f00e4be25942230668f43cb11a30b6fd10e6 /module/plugins
parentFixed spelling in the source (diff)
downloadpyload-b40b32ee05f611323a7827fad2a25fa0a28dcb24.tar.xz
a huge pile of spelling fixes
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/Account.py32
-rw-r--r--module/plugins/Addon.py8
-rw-r--r--module/plugins/Base.py10
-rw-r--r--module/plugins/Crypter.py14
-rw-r--r--module/plugins/Hoster.py14
-rw-r--r--module/plugins/PluginManager.py4
-rw-r--r--module/plugins/addons/Ev0InFetcher.py4
-rw-r--r--module/plugins/hoster/NetloadIn.py4
-rw-r--r--module/plugins/internal/AbstractExtractor.py12
-rw-r--r--module/plugins/internal/SimpleHoster.py2
10 files changed, 52 insertions, 52 deletions
diff --git a/module/plugins/Account.py b/module/plugins/Account.py
index 28d1387fd..7c24298e7 100644
--- a/module/plugins/Account.py
+++ b/module/plugins/Account.py
@@ -16,10 +16,10 @@ class WrongPassword(Exception):
#noinspection PyUnresolvedReferences
class Account(Base, AccountInfo):
"""
- Base class for every Account plugin.
- Just overwrite `login` and cookies will be stored and account becomes accessible in\
+ Base class for every account plugin.
+ Just overwrite `login` and cookies will be stored and the account becomes accessible in\
associated hoster plugin. Plugin should also provide `loadAccountInfo`. \
- A instance of this class is created for every entered account, it holds all \
+ An instance of this class is created for every entered account, it holds all \
fields of AccountInfo ttype, and can be set easily at runtime.
"""
@@ -78,7 +78,7 @@ class Account(Base, AccountInfo):
pass
def login(self, req):
- """login into account, the cookies will be saved so user can be recognized
+ """login into account, the cookies will be saved so the user can be recognized
:param req: `Request` instance
"""
@@ -101,7 +101,7 @@ class Account(Base, AccountInfo):
try:
self.login(req)
except TypeError: #TODO: temporary
- self.logDebug("Deprecated .login(...) signature ommit user, data")
+ self.logDebug("Deprecated .login(...) signature omit user, data")
self.login(self.loginname, {"password": self.password}, req)
@@ -129,10 +129,10 @@ class Account(Base, AccountInfo):
self.premium = Account.premium
def update(self, password=None, options=None):
- """ updates account and return true if anything changed """
+ """ updates the account and returns true if anything changed """
self.login_ts = 0
- self.valid = True #set valid so it will be retried to login
+ self.valid = True #set valid, so the login will be retried
if "activated" in options:
self.activated = from_string(options["avtivated"], "bool")
@@ -163,8 +163,8 @@ class Account(Base, AccountInfo):
@lock
def getAccountInfo(self, force=False):
- """retrieve account infos for an user, do **not** overwrite this method!\\
- just use it to retrieve infos in hoster plugins. see `loadAccountInfo`
+ """retrieve account info's for an user, do **not** overwrite this method!\\
+ just use it to retrieve info's in hoster plugins. see `loadAccountInfo`
:param name: username
:param force: reloads cached account information
@@ -180,7 +180,7 @@ class Account(Base, AccountInfo):
try:
infos = self.loadAccountInfo(req)
except TypeError: #TODO: temporary
- self.logDebug("Deprecated .loadAccountInfo(...) signature, ommit user argument.")
+ self.logDebug("Deprecated .loadAccountInfo(...) signature, omit user argument.")
infos = self.loadAccountInfo(self.loginname, req)
except Exception, e:
infos = {"error": str(e)}
@@ -221,7 +221,7 @@ class Account(Base, AccountInfo):
return self.premium
def isUsable(self):
- """Check several contraints to determine if account should be used"""
+ """Check several constraints to determine if account should be used"""
if not self.valid or not self.activated: return False
if self.options["time"]:
@@ -232,11 +232,11 @@ class Account(Base, AccountInfo):
if not compare_time(start.split(":"), end.split(":")):
return False
except:
- self.logWarning(_("Your Time %s has wrong format, use: 1:22-3:44") % time_data)
+ self.logWarning(_("Your Time %s has a wrong format, use: 1:22-3:44") % time_data)
if 0 <= self.validuntil < time():
return False
- if self.trafficleft is 0: # test explicity for 0
+ if self.trafficleft is 0: # test explicitly for 0
return False
return True
@@ -269,15 +269,15 @@ class Account(Base, AccountInfo):
self.scheduleRefresh(60 * 60)
def scheduleRefresh(self, time=0, force=True):
- """ add task to refresh account info to sheduler """
+ """ add a task for refreshing the account info to the scheduler """
self.logDebug("Scheduled Account refresh for %s in %s seconds." % (self.loginname, time))
self.core.scheduler.addJob(time, self.getAccountInfo, [force])
@lock
def checkLogin(self, req):
- """ checks if user is still logged in """
+ """ checks if the user is still logged in """
if self.login_ts + self.login_timeout * 60 < time():
- if self.login_ts: # seperate from fresh login to have better debug logs
+ if self.login_ts: # separate from fresh login to have better debug logs
self.logDebug("Reached login timeout for %s" % self.loginname)
else:
self.logDebug("Login with %s" % self.loginname)
diff --git a/module/plugins/Addon.py b/module/plugins/Addon.py
index fe9ae4817..3fc4eb467 100644
--- a/module/plugins/Addon.py
+++ b/module/plugins/Addon.py
@@ -81,20 +81,20 @@ def threaded(f):
class Addon(Base):
"""
- Base class for addon plugins. Use @threaded decorator for all longer running task.
+ Base class for addon plugins. Use @threaded decorator for all longer running tasks.
- Decorate methods with @Expose, @AddventListener, @ConfigHandler
+ Decorate methods with @Expose, @AddEventListener, @ConfigHandler
"""
- #: automatically register event listeners for functions, attribute will be deleted dont use it yourself
+ #: automatically register event listeners for functions, attribute will be deleted don't use it yourself
event_map = None
# Alternative to event_map
#: List of events the plugin can handle, name the functions exactly like eventname.
event_list = None # dont make duplicate entries in event_map
- #: periodic call interval in secondc
+ #: periodic call interval in seconds
interval = 60
def __init__(self, core, manager):
diff --git a/module/plugins/Base.py b/module/plugins/Base.py
index 61fa211f4..4649a2b08 100644
--- a/module/plugins/Base.py
+++ b/module/plugins/Base.py
@@ -95,8 +95,8 @@ class Base(object):
def logInfo(self, *args, **kwargs):
""" Print args to log at specific level
- :param args: Arbitary object which should be logged
- :param kwargs: sep=(how to seperate arguments), default = " | "
+ :param args: Arbitrary object which should be logged
+ :param kwargs: sep=(how to separate arguments), default = " | "
"""
self._log("info", *args, **kwargs)
@@ -173,7 +173,7 @@ class Base(object):
return False
def checkAbort(self):
- """ Will be overwriten to determine if control flow should be aborted """
+ """ Will be overwritten to determine if control flow should be aborted """
if self.abort: raise Abort()
def load(self, url, get={}, post={}, ref=True, cookies=True, just_header=False, decode=False):
@@ -185,7 +185,7 @@ class Base(object):
:param ref: Set HTTP_REFERER header
:param cookies: use saved cookies
:param just_header: if True only the header will be retrieved and returned as dict
- :param decode: Wether to decode the output according to http header, should be True in most cases
+ :param decode: Whether to decode the output according to http header, should be True in most cases
:return: Loaded content
"""
if not hasattr(self, "req"): raise Exception("Plugin type does not have Request attribute.")
@@ -308,7 +308,7 @@ class Base(object):
elif task.error:
self.fail(task.error)
elif not task.result:
- self.fail(_("No captcha result obtained in appropiate time by any of the plugins."))
+ self.fail(_("No captcha result obtained in appropriate time by any of the plugins."))
result = task.result
self.log.debug("Received captcha result: %s" % str(result))
diff --git a/module/plugins/Crypter.py b/module/plugins/Crypter.py
index 15feea8e0..920009f44 100644
--- a/module/plugins/Crypter.py
+++ b/module/plugins/Crypter.py
@@ -9,7 +9,7 @@ from module.utils.fs import exists, remove, fs_encode
from Base import Base, Retry
class Package:
- """ Container that indicates new package should be created """
+ """ Container that indicates that a new package should be created """
def __init__(self, name, urls=None):
self.name = name
self.urls = urls if urls else []
@@ -102,14 +102,14 @@ class Crypter(Base):
Base.__init__(self, core)
self.req = core.requestFactory.getRequest(self.__name__)
- # Package the plugin was initialized for, dont use this, its not guaranteed to be set
+ # Package the plugin was initialized for, don't use this, its not guaranteed to be set
self.package = package
#: Password supplied by user
self.password = password
#: Propose a renaming of the owner package
self.rename = None
- # For old style decrypter, do not use these !
+ # For old style decrypter, do not use these!
self.packages = []
self.urls = []
self.pyfile = None
@@ -120,7 +120,7 @@ class Crypter(Base):
"""More init stuff if needed"""
def setup(self):
- """Called everytime before decrypting. A Crypter plugin will be most likly used for several jobs."""
+ """Called everytime before decrypting. A Crypter plugin will be most likely used for several jobs."""
def decryptURL(self, url):
"""Decrypt a single url
@@ -150,7 +150,7 @@ class Crypter(Base):
raise NotImplementedError
def generatePackages(self, urls):
- """Generates :class:`Package` instances and names from urls. Usefull for many different links and no\
+ """Generates :class:`Package` instances and names from urls. Useful for many different links and no\
given package name.
:param urls: list of urls
@@ -166,7 +166,7 @@ class Crypter(Base):
"""
cls = self.__class__
- # seperate local and remote files
+ # separate local and remote files
content, urls = self.getLocalContent(urls)
if has_method(cls, "decryptURLs"):
@@ -214,7 +214,7 @@ class Crypter(Base):
return []
def getLocalContent(self, urls):
- """Load files from disk and seperate to file content and url list
+ """Load files from disk and separate to file content and url list
:param urls:
:return: list of (filename, content), remote urls
diff --git a/module/plugins/Hoster.py b/module/plugins/Hoster.py
index b330743e6..737bdcdb4 100644
--- a/module/plugins/Hoster.py
+++ b/module/plugins/Hoster.py
@@ -48,7 +48,7 @@ class Hoster(Base):
def getInfo(urls):
"""This method is used to retrieve the online status of files for hoster plugins.
It has to *yield* list of tuples with the result in this format (name, size, status, url),
- where status is one of API pyfile statusses.
+ where status is one of API pyfile statuses.
:param urls: List of urls
:return: yield list of tuple with results (name, size, status, url)
@@ -108,11 +108,11 @@ class Hoster(Base):
self.init()
def getMultiDL(self):
- self.logDebug("Deprectated attribute multiDL, use limitDL instead")
+ self.logDebug("Deprecated attribute multiDL, use limitDL instead")
return self.limitDL <= 0
def setMultiDL(self, val):
- self.logDebug("Deprectated attribute multiDL, use limitDL instead")
+ self.logDebug("Deprecated attribute multiDL, use limitDL instead")
self.limitDL = 0 if val else 1
multiDL = property(getMultiDL, setMultiDL)
@@ -142,7 +142,7 @@ class Hoster(Base):
pass
def setup(self):
- """ setup for enviroment and other things, called before downloading (possibly more than one time)"""
+ """ setup for environment and other things, called before downloading (possibly more than one time)"""
pass
def preprocessing(self, thread):
@@ -150,7 +150,7 @@ class Hoster(Base):
self.thread = thread
if self.account:
- # will force a relogin or reload of account info if necessary
+ # will force a re-login or reload of account info if necessary
self.account.getAccountInfo()
else:
self.req.clearCookies()
@@ -169,7 +169,7 @@ class Hoster(Base):
return self.pyfile.abort
def resetAccount(self):
- """ dont use account and retry download """
+ """ don't use account and retry download """
self.account = None
self.req = self.core.requestFactory.getRequest(self.__name__)
self.retry()
@@ -372,7 +372,7 @@ class Hoster(Base):
if pyfile.status in (0, 12): #finished or downloading
raise SkipDownload(pyfile.pluginname)
elif pyfile.status in (
- 5, 7) and starting: #a download is waiting/starting and was appenrently started before
+ 5, 7) and starting: #a download is waiting/starting and was apparently started before
raise SkipDownload(pyfile.pluginname)
download_folder = self.config['general']['download_folder']
diff --git a/module/plugins/PluginManager.py b/module/plugins/PluginManager.py
index 733cd2c5d..f42bd08c6 100644
--- a/module/plugins/PluginManager.py
+++ b/module/plugins/PluginManager.py
@@ -221,7 +221,7 @@ class PluginManager:
def parseUrls(self, urls):
- """parse plugins for given list of urls, seperate to crypter and hoster"""
+ """parse plugins for given list of urls, separate to crypter and hoster"""
res = {"hoster": [], "crypter": []} # tupels of (url, plugin)
@@ -313,7 +313,7 @@ class PluginManager:
def find_module(self, fullname, path=None):
#redirecting imports if necesarry
- if fullname.startswith(self.ROOT) or fullname.startswith(self.USERROOT): #seperate pyload plugins
+ if fullname.startswith(self.ROOT) or fullname.startswith(self.USERROOT): #separate pyload plugins
if fullname.startswith(self.USERROOT): user = 1
else: user = 0 #used as bool and int
diff --git a/module/plugins/addons/Ev0InFetcher.py b/module/plugins/addons/Ev0InFetcher.py
index aeb46320a..608baf217 100644
--- a/module/plugins/addons/Ev0InFetcher.py
+++ b/module/plugins/addons/Ev0InFetcher.py
@@ -27,9 +27,9 @@ class Ev0InFetcher(Addon):
__config__ = [("activated", "bool", "Activated", "False"),
("interval", "int", "Check interval in minutes", "10"),
("queue", "bool", "Move new shows directly to Queue", False),
- ("shows", "str", "Shows to check for (comma seperated)", ""),
+ ("shows", "str", "Shows to check for (comma separated)", ""),
("quality", "xvid;x264;rmvb", "Video Format", "xvid"),
- ("hoster", "str", "Hoster to use (comma seperated)", "NetloadIn,RapidshareCom,MegauploadCom,HotfileCom")]
+ ("hoster", "str", "Hoster to use (comma separated)", "NetloadIn,RapidshareCom,MegauploadCom,HotfileCom")]
__author_name__ = ("mkaay")
__author_mail__ = ("mkaay@mkaay.de")
diff --git a/module/plugins/hoster/NetloadIn.py b/module/plugins/hoster/NetloadIn.py
index 382328496..d768090e8 100644
--- a/module/plugins/hoster/NetloadIn.py
+++ b/module/plugins/hoster/NetloadIn.py
@@ -10,7 +10,7 @@ from module.plugins.Hoster import Hoster
from module.network.RequestFactory import getURL
def getInfo(urls):
- ## returns list of tupels (name, size (in bytes), status (see FileDatabase), url)
+ ## returns list of tuples (name, size (in bytes), status (see FileDatabase), url)
apiurl = "http://api.netload.in/info.php?auth=Zf9SnQh9WiReEsb18akjvQGqT0I830e8&bz=1&md5=1&file_id="
@@ -196,7 +196,7 @@ class NetloadIn(Hoster):
file_id = re.search('<input name="file_id" type="hidden" value="(.*)" />', page).group(1)
if not captchawaited:
wait = self.get_wait_time(page)
- if i == 0: self.pyfile.waitUntil = time() # dont wait contrary to time on website
+ if i == 0: self.pyfile.waitUntil = time() # don't wait contrary to time on web site
else: self.pyfile.waitUntil = t
self.log.info(_("Netload: waiting for captcha %d s.") % (self.pyfile.waitUntil - time()))
#self.setWait(wait)
diff --git a/module/plugins/internal/AbstractExtractor.py b/module/plugins/internal/AbstractExtractor.py
index ceb188193..3cd635eff 100644
--- a/module/plugins/internal/AbstractExtractor.py
+++ b/module/plugins/internal/AbstractExtractor.py
@@ -13,7 +13,7 @@ class WrongPassword(Exception):
class AbtractExtractor:
@staticmethod
def checkDeps():
- """ Check if system statisfy dependencies
+ """ Check if system satisfies dependencies
:return: boolean
"""
return True
@@ -21,7 +21,7 @@ class AbtractExtractor:
@staticmethod
def getTargets(files_ids):
""" Filter suited targets from list of filename id tuple list
- :param files_ids: List of filepathes
+ :param files_ids: List of file paths
:return: List of targets, id tuple list
"""
raise NotImplementedError
@@ -30,10 +30,10 @@ class AbtractExtractor:
def __init__(self, m, file, out, fullpath, overwrite, renice):
"""Initialize extractor for specific file
- :param m: ExtractArchive Addon plugin
- :param file: Absolute filepath
+ :param m: ExtractArchive addon plugin
+ :param file: Absolute file path
:param out: Absolute path to destination directory
- :param fullpath: extract to fullpath
+ :param fullpath: Extract to fullpath
:param overwrite: Overwrite existing archives
:param renice: Renice value
"""
@@ -52,7 +52,7 @@ class AbtractExtractor:
def checkArchive(self):
- """Check if password if needed. Raise ArchiveError if integrity is
+ """Check if password is needed. Raise ArchiveError if integrity is
questionable.
:return: boolean
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py
index 69909a8a1..20263064a 100644
--- a/module/plugins/internal/SimpleHoster.py
+++ b/module/plugins/internal/SimpleHoster.py
@@ -103,7 +103,7 @@ class SimpleHoster(Hoster):
or FILE_NAME_INFO = r'(?P<N>file_name)'
and FILE_SIZE_INFO = r'(?P<S>file_size) (?P<U>units)'
FILE_OFFLINE_PATTERN = r'File (deleted|not found)'
- TEMP_OFFLINE_PATTERN = r'Server maintainance'
+ TEMP_OFFLINE_PATTERN = r'Server maintenance'
"""
FILE_SIZE_REPLACEMENTS = []