diff --git a/usr/lib/hypnotix/common.py b/usr/lib/hypnotix/common.py index d337926..af3e0e0 100755 --- a/usr/lib/hypnotix/common.py +++ b/usr/lib/hypnotix/common.py @@ -107,14 +107,17 @@ def __init__(self, provider, info): if self.name == None and "," in info: self.name = info.split(",")[-1].strip() if self.logo != None: - ext = None - for known_ext in [".png", ".jpg", ".gif", ".jpeg"]: - if self.logo.lower().endswith(known_ext): - ext = known_ext - break - if ext == ".jpeg": - ext = ".jpg" - self.logo_path = os.path.join(PROVIDERS_PATH, "%s-%s%s" % (slugify(provider.name), slugify(self.name), ext)) + if self.logo.startswith("file://"): + self.logo_path = self.logo[7:] + else: + ext = None + for known_ext in [".png", ".jpg", ".gif", ".jpeg"]: + if self.logo.lower().endswith(known_ext): + ext = known_ext + break + if ext == ".jpeg": + ext = ".jpg" + self.logo_path = os.path.join(PROVIDERS_PATH, "%s-%s%s" % (slugify(provider.name), slugify(self.name), ext)) class Manager():