Skip to content

Commit 11cab4f

Browse files
committed
reduce cache to only what is actually used
1 parent d3b4684 commit 11cab4f

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

exportify-cli.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,14 @@ def export_playlist(self, playlist: dict, output_dir: Path) -> None:
407407
)
408408
for alb in new_albums:
409409
if alb and alb.get("id"):
410-
self.album_cache[alb["id"]] = alb
410+
self.album_cache[alb["id"]] = {
411+
"id": alb.get("id"),
412+
"uri": alb.get("uri"),
413+
"name": alb.get("name"),
414+
"release_date": alb.get("release_date"),
415+
"label": alb.get("label"),
416+
"external_ids": alb.get("external_ids", {}),
417+
}
411418

412419
# Build a lookup from cache
413420
albums = {aid: self.album_cache[aid] for aid in album_ids}
@@ -588,7 +595,7 @@ def format_usage(self, ctx, formatter) -> None:
588595
)
589596
@click.help_option("-h", "--help")
590597
@click.version_option(
591-
"0.4",
598+
"0.5",
592599
"-v",
593600
"--version",
594601
prog_name="exportify-cli",

0 commit comments

Comments
 (0)