Fix metadata enhancement crash when album_info is None
Playlist and single track downloads pass None as album_info to _enhance_file_metadata. The downstream _extract_spotify_metadata called .get() on it without a null guard, crashing with AttributeError.
This commit is contained in:
parent
f5a2d51d4e
commit
2c15d50bff
1 changed files with 2 additions and 0 deletions
|
|
@ -19078,6 +19078,8 @@ def _generate_lrc_file(file_path: str, context: dict, artist: dict, album_info:
|
|||
def _extract_spotify_metadata(context: dict, artist: dict, album_info: dict) -> dict:
|
||||
"""Extracts a comprehensive metadata dictionary from the provided context."""
|
||||
metadata = {}
|
||||
if album_info is None:
|
||||
album_info = {}
|
||||
original_search = context.get("original_search_result", {})
|
||||
spotify_album = context.get("spotify_album")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue