diff options
author | synweap15 <shamdog+github@gmail.com> | 2014-12-30 20:21:23 +0100 |
---|---|---|
committer | synweap15 <shamdog+github@gmail.com> | 2014-12-30 20:21:23 +0100 |
commit | ac9ba34bd5e629ddfbe67dec88ff2e0653e80356 (patch) | |
tree | f77bc281bd083145b19e82bf0e5ff34f5cd6f01a /module/plugins/container/LinkList.py | |
parent | [Oboom] new hoster and account (diff) | |
parent | Update some MultiHoster __pattern__ (diff) | |
download | pyload-ac9ba34bd5e629ddfbe67dec88ff2e0653e80356.tar.xz |
Merge pull request #1 from pyload/stable
Merge
Diffstat (limited to 'module/plugins/container/LinkList.py')
-rw-r--r-- | module/plugins/container/LinkList.py | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/module/plugins/container/LinkList.py b/module/plugins/container/LinkList.py index 79678954d..c6173ad73 100644 --- a/module/plugins/container/LinkList.py +++ b/module/plugins/container/LinkList.py @@ -1,18 +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" + __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)", "")] - __author_name__ = ("spoob", "jeix") - __author_mail__ = ("spoob@pyload.org", "jeix@hasnomail.com") + + __description__ = """Read link lists in txt format""" + __license__ = "GPLv3" + __authors__ = [("spoob", "spoob@pyload.org"), + ("jeix", "jeix@hasnomail.com")] + def decrypt(self, pyfile): try: @@ -20,9 +26,6 @@ class LinkList(Container): except: file_enc = "utf-8" - print repr(pyfile.url) - print pyfile.url - file_name = fs_encode(pyfile.url) txt = codecs.open(file_name, 'r', file_enc) @@ -33,7 +36,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 +65,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)) |