feature/sponsorblock #17

Merged
Hazel merged 20 commits from feature/sponsorblock into experimental 2024-04-27 09:41:36 +00:00
2 changed files with 2 additions and 2 deletions
Showing only changes of commit 2bf362c696 - Show all commits

View File

@ -194,7 +194,7 @@ class Connection:
additional_info = cached.attribute.additional_info
body = cached.content
if "encoding" in additional_info:
if additional_info.get("encoding", None) is not None:
body = body.decode(additional_info["encoding"])
resp.add(

View File

@ -51,7 +51,7 @@ class Artwork:
return min(self._variant_mapping.values(), key=lambda x: x["deviation"])
def get_variant_name(self, variant: ArtworkVariant) -> str:
return f"artwork_{variant['width']}x{variant['height']}_{hash_url(variant['url'])}"
return f"artwork_{variant['width']}x{variant['height']}_{hash_url(variant['url']).replace('/', '_')}"
def __merge__(self, other: Artwork, override: bool = False) -> None:
for key, value in other._variant_mapping.items():