Guard album_info None check in cover art MBID storage

album_info can be None for single track downloads — the dict
assignment would crash with TypeError. Added None check.
This commit is contained in:
Broque Thomas 2026-03-30 22:02:45 -07:00
parent f3047c46cf
commit 13ea2fc1fe

View file

@ -16445,6 +16445,7 @@ def _embed_source_ids(audio_file, metadata: dict):
if _rc_mbid: if _rc_mbid:
metadata['musicbrainz_release_id'] = _rc_mbid metadata['musicbrainz_release_id'] = _rc_mbid
# Also store on album_info so _download_cover_art can use it for cover.jpg # Also store on album_info so _download_cover_art can use it for cover.jpg
if album_info is not None:
album_info['musicbrainz_release_id'] = _rc_mbid album_info['musicbrainz_release_id'] = _rc_mbid
# Write release year to file tags if not already present # Write release year to file tags if not already present