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:
parent
f3047c46cf
commit
13ea2fc1fe
1 changed files with 2 additions and 1 deletions
|
|
@ -16445,7 +16445,8 @@ 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
|
||||||
album_info['musicbrainz_release_id'] = _rc_mbid
|
if album_info is not None:
|
||||||
|
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
|
||||||
if release_year and 'ORIGINALDATE' not in id_tags:
|
if release_year and 'ORIGINALDATE' not in id_tags:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue