From 6c80f7bf4e9e1e21eeb0cc2522e6b674b793cd7a Mon Sep 17 00:00:00 2001 From: Christopher <4Christopher@gmx.de> Date: Mon, 11 Mar 2013 20:48:41 +0100 Subject: added setting to set how many URLs should be returned for each episode. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Usually the first URL will be all you need. The movie2k.to website also just returns the first URL but in the source code of the website there are more links for each episode … --- module/plugins/crypter/ChipDe.py | 1 - module/plugins/crypter/Movie2kTo.py | 56 ++++++++++++++++++++----------------- 2 files changed, 30 insertions(+), 27 deletions(-) diff --git a/module/plugins/crypter/ChipDe.py b/module/plugins/crypter/ChipDe.py index 955d731b2..fcb84a300 100644 --- a/module/plugins/crypter/ChipDe.py +++ b/module/plugins/crypter/ChipDe.py @@ -14,7 +14,6 @@ class ChipDe(Crypter): __author_mail__ = ('4Christopher@gmx.de') def decrypt(self, pyfile): - # self.package = pyfile.package() self.html = self.load(pyfile.url) try: url = re.search(r'"(http://video.chip.de/\d+?/.*)"', self.html).group(1) diff --git a/module/plugins/crypter/Movie2kTo.py b/module/plugins/crypter/Movie2kTo.py index a9cdb188b..1b93dfa78 100644 --- a/module/plugins/crypter/Movie2kTo.py +++ b/module/plugins/crypter/Movie2kTo.py @@ -3,15 +3,17 @@ import re from module.plugins.Crypter import Crypter +from collections import defaultdict class Movie2kTo(Crypter): - __name__ = "Movie2kTo" - __type__ = "container" - __pattern__ = r"http://(?:www\.)?movie2k\.to/(.*)\.html" - __version__ = "0.2" - __config__ = [("accepted_hosters", "str", "List of accepted hosters", "Xvidstage, "), - ("whole_season", "bool", "Download whole season", "False"), - ("everything", "bool", "Download everything", "False")] + __name__ = 'Movie2kTo' + __type__ = 'container' + __pattern__ = r'http://(?:www\.)?movie2k\.to/(.*)\.html' + __version__ = '0.3' + __config__ = [('accepted_hosters', 'str', 'List of accepted hosters', 'Xvidstage, '), + ('whole_season', 'bool', 'Download whole season', 'False'), + ('everything', 'bool', 'Download everything', 'False'), + ('firstN', 'int', 'Download the first N files for each episode. The first file is probably all you will need.', '1')] __description__ = """Movie2k.to Container Plugin""" __author_name__ = ('4Christopher') __author_mail__ = ('4Christopher@gmx.de') @@ -21,7 +23,7 @@ class Movie2kTo(Crypter): SEASON_PATTERN = r'