save cover lru cache

This commit is contained in:
R. M 2023-09-08 23:32:41 -03:00
parent 72df094194
commit 8926052751

View File

@ -622,6 +622,7 @@ class Downloader:
final_location.parent.mkdir(parents=True, exist_ok=True)
shutil.move(fixed_location, final_location)
@functools.lru_cache()
def save_cover(self, cover_location: Path, cover_url: str) -> None:
with open(cover_location, "wb") as f:
f.write(self.get_cover(cover_url))