From edbc5c78d9bccdcf2104fda497800b79b751f3ba Mon Sep 17 00:00:00 2001 From: Thomas Lau Date: Fri, 5 Nov 2021 15:50:55 +0000 Subject: [PATCH] add album artist: --- zspotify/const.py | 2 ++ zspotify/utils.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/zspotify/const.py b/zspotify/const.py index a47ac56a..a76231db 100644 --- a/zspotify/const.py +++ b/zspotify/const.py @@ -18,6 +18,8 @@ ARTIST = 'artist' ARTISTS = 'artists' +ALBUMARTIST = 'albumartist' + ARTWORK = 'artwork' TRACKS = 'tracks' diff --git a/zspotify/utils.py b/zspotify/utils.py index 038ae68d..d0dc8738 100644 --- a/zspotify/utils.py +++ b/zspotify/utils.py @@ -10,7 +10,7 @@ import music_tag import requests from const import ARTIST, TRACKTITLE, ALBUM, YEAR, DISCNUMBER, TRACKNUMBER, ARTWORK, \ - WINDOWS_SYSTEM + WINDOWS_SYSTEM, ALBUMARTIST class MusicFormat(str, Enum): @@ -102,6 +102,7 @@ def clear() -> None: def set_audio_tags(filename, artists, name, album_name, release_year, disc_number, track_number) -> None: """ sets music_tag metadata """ tags = music_tag.load_file(filename) + tags[ALBUMARTIST] = artists[0] tags[ARTIST] = conv_artist_format(artists) tags[TRACKTITLE] = name tags[ALBUM] = album_name