diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2012-01-01 13:36:59 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2012-01-01 13:36:59 +0100 |
commit | 35742c2cb023ac49ab3056752d2040cdb030cc2b (patch) | |
tree | d0f22f591b2b81ab24a982a44820a3d86ba5eea3 /module/plugins/container | |
parent | missing import (diff) | |
download | pyload-35742c2cb023ac49ab3056752d2040cdb030cc2b.tar.xz |
Happy new Year !
Diffstat (limited to 'module/plugins/container')
-rw-r--r-- | module/plugins/container/LinkList.py | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/module/plugins/container/LinkList.py b/module/plugins/container/LinkList.py deleted file mode 100644 index 614c76c90..000000000 --- a/module/plugins/container/LinkList.py +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - - -from module.plugins.Crypter import Crypter - -class LinkList(Crypter): - __name__ = "LinkList" - __version__ = "0.11" - __pattern__ = r".+\.txt$" - __description__ = """Read Link Lists in txt format""" - __config__ = [("clear", "bool", "Clear Linklist after adding", False)] - __author_name__ = ("spoob", "jeix") - __author_mail__ = ("spoob@pyload.org", "jeix@hasnomail.com") - - - def decrypt(self, pyfile): - txt = open(pyfile.url, 'r') - links = txt.readlines() - curPack = "Parsed links from %s" % pyfile.name - - packages = {curPack:[],} - - for link in links: - link = link.strip() - if not link: continue - - if link.startswith(";"): - continue - if link.startswith("[") and link.endswith("]"): - # new package - curPack = link[1:-1] - packages[curPack] = [] - continue - packages[curPack].append(link) - txt.close() - - # empty packages fix - - delete = [] - - for key,value in packages.iteritems(): - if not value: - delete.append(key) - - for key in delete: - del packages[key] - - if self.getConfig("clear"): - try: - txt = open(pyfile.url, 'wb') - txt.close() - except: - self.log.warning(_("LinkList could not be cleared.")) - - for name, links in packages.iteritems(): - self.packages.append((name, links, name)) |