Skip to content

Commit 89064ab

Browse files
committed
reduce cache to only what is actually used
1 parent d3b4684 commit 89064ab

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

exportify-cli.py

Lines changed: 8 additions & 1 deletion
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}

0 commit comments

Comments
 (0)