diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-09-07 23:40:50 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-09-14 10:58:42 +0200 |
commit | 887ad58e4c6c20b992311bbdf931bcd18e73d384 (patch) | |
tree | f31beb241bacca0bfea4c1acc4e9ace813755cef /module/plugins/container/LinkList.py | |
parent | [AccountManager] Fixed #733 (diff) | |
parent | [File4safe] distributing LINK_PATTERN (diff) | |
download | pyload-887ad58e4c6c20b992311bbdf931bcd18e73d384.tar.xz |
Merge branch 'stable' into 0.4.10
Conflicts:
module/plugins/Account.py
module/plugins/AccountManager.py
module/plugins/Hook.py
module/plugins/OCR.py
module/plugins/Plugin.py
module/plugins/PluginManager.py
module/plugins/ReCaptcha.py
module/plugins/accounts/Ftp.py
module/plugins/accounts/Http.py
module/plugins/internal/MultiHoster.py
module/plugins/ocr/GigasizeCom.py
module/plugins/ocr/LinksaveIn.py
module/plugins/ocr/NetloadIn.py
module/plugins/ocr/ShareonlineBiz.py
Diffstat (limited to 'module/plugins/container/LinkList.py')
-rw-r--r-- | module/plugins/container/LinkList.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/module/plugins/container/LinkList.py b/module/plugins/container/LinkList.py index 79678954d..7e418bd67 100644 --- a/module/plugins/container/LinkList.py +++ b/module/plugins/container/LinkList.py @@ -1,19 +1,24 @@ # -*- coding: utf-8 -*- import codecs -from module.utils import fs_encode + from module.plugins.Container import Container +from module.utils import fs_encode + class LinkList(Container): __name__ = "LinkList" __version__ = "0.12" + __pattern__ = r'.+\.txt' - __description__ = """Read link lists in txt format""" __config__ = [("clear", "bool", "Clear Linklist after adding", False), ("encoding", "string", "File encoding (default utf-8)", "")] + + __description__ = """Read link lists in txt format""" __author_name__ = ("spoob", "jeix") __author_mail__ = ("spoob@pyload.org", "jeix@hasnomail.com") + def decrypt(self, pyfile): try: file_enc = codecs.lookup(self.getConfig("encoding")).name @@ -33,7 +38,8 @@ class LinkList(Container): for link in links: link = link.strip() - if not link: continue + if not link: + continue if link.startswith(";"): continue @@ -61,7 +67,7 @@ class LinkList(Container): txt = open(file_name, 'wb') txt.close() except: - self.log.warning(_("LinkList could not be cleared.")) + self.logWarning(_("LinkList could not be cleared.")) for name, links in packages.iteritems(): self.packages.append((name, links, name)) |