From 04c47a8052c4180cb0c7222b9f0cd5929c825b07 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 18 Jan 2015 19:16:28 +0100 Subject: [SimpleHoster] Fix fileUrl follow_location --- module/plugins/internal/SimpleHoster.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'module/plugins/internal/SimpleHoster.py') diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py index e499f4e47..d55ed6f99 100644 --- a/module/plugins/internal/SimpleHoster.py +++ b/module/plugins/internal/SimpleHoster.py @@ -144,12 +144,12 @@ def fileUrl(self, url, follow_location=False): link = "" redirect = 1 - if isinstance(follow_location, int): - redirect = max(follow_location, 1) - - elif follow_location: + if isinstance(follow_location, bool): redirect = 5 + elif isinstance(follow_location, int): + redirect = max(follow_location, 1) + for i in xrange(redirect): self.logDebug("Redirect #%d to: %s" % (i, url)) @@ -219,7 +219,7 @@ def secondsToMidnight(gmt=0): class SimpleHoster(Hoster): __name__ = "SimpleHoster" __type__ = "hoster" - __version__ = "1.03" + __version__ = "1.04" __pattern__ = r'^unmatchable$' -- cgit v1.2.3