Skip to content

Commit

Permalink
copyright fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Georg Perhofer committed Dec 12, 2022
1 parent 3f90b14 commit 690c47a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions qobuz_dl/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ def _embed_id3_img(root_dir, audio: id3.ID3):


# Use KeyError catching instead of dict.get to avoid empty tags
def tag_flac(filename, root_dir, final_name, d, album, istrack=True, em_image=False):
def tag_flac(
filename, root_dir, final_name, d: dict, album, istrack=True, em_image=False
):
"""
Tag a FLAC file
Expand Down Expand Up @@ -148,14 +150,14 @@ def tag_flac(filename, root_dir, final_name, d, album, istrack=True, em_image=Fa
audio["TRACKTOTAL"] = str(d["album"]["tracks_count"])
audio["ALBUM"] = d["album"]["title"]
audio["DATE"] = d["album"]["release_date_original"]
audio["COPYRIGHT"] = _format_copyright(d.get("copyright", "n/a"))
audio["COPYRIGHT"] = _format_copyright(d.get("copyright") or "n/a")
else:
audio["GENRE"] = _format_genres(album["genres_list"])
audio["ALBUMARTIST"] = album["artist"]["name"]
audio["TRACKTOTAL"] = str(album["tracks_count"])
audio["ALBUM"] = album["title"]
audio["DATE"] = album["release_date_original"]
audio["COPYRIGHT"] = _format_copyright(album.get("copyright", "n/a"))
audio["COPYRIGHT"] = _format_copyright(album.get("copyright") or "n/a")

if em_image:
_embed_flac_img(root_dir, audio)
Expand Down

0 comments on commit 690c47a

Please sign in to comment.