feat: caching of artwork request
This commit is contained in:
@@ -8,7 +8,7 @@ from .metadata import (
|
||||
ID3Timestamp,
|
||||
Metadata
|
||||
)
|
||||
from ..utils.string_processing import unify, hash_url
|
||||
from ..utils.string_processing import unify, hash_url, hash_url
|
||||
|
||||
from .parents import OuterProxy as Base
|
||||
|
||||
@@ -50,6 +50,9 @@ class Artwork:
|
||||
return None
|
||||
return min(self._variant_mapping.values(), key=lambda x: x["deviation"])
|
||||
|
||||
def get_variant_name(self, variant: ArtworkVariant, option_string: str) -> str:
|
||||
return f"artwork_{variant['width']}x{variant['height']}_{option_string}"
|
||||
|
||||
def __merge__(self, other: Artwork, override: bool = False) -> None:
|
||||
for key, value in other._variant_mapping.items():
|
||||
if key not in self._variant_mapping or override:
|
||||
|
Reference in New Issue
Block a user