diff options
author | Christopher <4Christopher@gmx.de> | 2013-03-11 21:12:25 +0100 |
---|---|---|
committer | Christopher <4Christopher@gmx.de> | 2013-03-11 21:12:25 +0100 |
commit | 4d75aeef3fdd88ccbda9eb54c4e604a3fbf96c41 (patch) | |
tree | 65d3a5fab97cc86324ed0a5fcd22f73f795d935b /module | |
parent | Merge branch 'stable' of git://github.com/pyload/pyload into stable (diff) | |
download | pyload-4d75aeef3fdd88ccbda9eb54c4e604a3fbf96c41.tar.xz |
made the firstN setting ready for more than one hoster
Diffstat (limited to 'module')
-rw-r--r-- | module/plugins/crypter/Movie2kTo.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/module/plugins/crypter/Movie2kTo.py b/module/plugins/crypter/Movie2kTo.py index 1b93dfa78..d1c711f17 100644 --- a/module/plugins/crypter/Movie2kTo.py +++ b/module/plugins/crypter/Movie2kTo.py @@ -93,11 +93,11 @@ class Movie2kTo(Crypter): re_hoster_id = re_hoster_id_js elif re_hoster_id_html.search(self.html): re_hoster_id = re_hoster_id_html - count = 0 + count = defaultdict(int) for h_id, hoster in re_hoster_id.findall(self.html): if hoster in accepted_hosters: - count += 1 - if count <= firstN: + count[hoster] += 1 + if count[hoster] <= firstN: if h_id != self.id: self.html = self.load('%s/tvshows-%s-%s.html' % (self.BASE_URL, h_id, self.name)) else: |