mirror of
https://github.com/glomatico/gamdl.git
synced 2025-01-22 11:18:39 +00:00
create parent directory before saving cover image
This commit is contained in:
parent
091ca3bf53
commit
a35a3835aa
@ -512,6 +512,7 @@ class Downloader:
|
|||||||
|
|
||||||
@functools.lru_cache()
|
@functools.lru_cache()
|
||||||
def save_cover(self, cover_path: Path, cover_url: str):
|
def save_cover(self, cover_path: Path, cover_url: str):
|
||||||
|
cover_path.parent.mkdir(parents=True, exist_ok=True)
|
||||||
cover_path.write_bytes(self.get_url_response_bytes(cover_url))
|
cover_path.write_bytes(self.get_url_response_bytes(cover_url))
|
||||||
|
|
||||||
def cleanup_temp_path(self):
|
def cleanup_temp_path(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user