summaryrefslogtreecommitdiffstats
path: root/module/plugins/container/LinkList.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/container/LinkList.py')
-rw-r--r--module/plugins/container/LinkList.py14
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))