mirror of
https://github.com/Wojtek242/qobuz-dl.git
synced 2024-11-22 11:05:25 +01:00
copyright fix
This commit is contained in:
parent
3f90b14819
commit
690c47a59c
@ -108,7 +108,9 @@ def _embed_id3_img(root_dir, audio: id3.ID3):
|
|||||||
|
|
||||||
|
|
||||||
# Use KeyError catching instead of dict.get to avoid empty tags
|
# 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
|
Tag a FLAC file
|
||||||
|
|
||||||
@ -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["TRACKTOTAL"] = str(d["album"]["tracks_count"])
|
||||||
audio["ALBUM"] = d["album"]["title"]
|
audio["ALBUM"] = d["album"]["title"]
|
||||||
audio["DATE"] = d["album"]["release_date_original"]
|
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:
|
else:
|
||||||
audio["GENRE"] = _format_genres(album["genres_list"])
|
audio["GENRE"] = _format_genres(album["genres_list"])
|
||||||
audio["ALBUMARTIST"] = album["artist"]["name"]
|
audio["ALBUMARTIST"] = album["artist"]["name"]
|
||||||
audio["TRACKTOTAL"] = str(album["tracks_count"])
|
audio["TRACKTOTAL"] = str(album["tracks_count"])
|
||||||
audio["ALBUM"] = album["title"]
|
audio["ALBUM"] = album["title"]
|
||||||
audio["DATE"] = album["release_date_original"]
|
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:
|
if em_image:
|
||||||
_embed_flac_img(root_dir, audio)
|
_embed_flac_img(root_dir, audio)
|
||||||
|
Loading…
Reference in New Issue
Block a user