From 4d75aeef3fdd88ccbda9eb54c4e604a3fbf96c41 Mon Sep 17 00:00:00 2001 From: Christopher <4Christopher@gmx.de> Date: Mon, 11 Mar 2013 21:12:25 +0100 Subject: made the firstN setting ready for more than one hoster --- module/plugins/crypter/Movie2kTo.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module') 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: -- cgit v1.2.3