add album artist:

This commit is contained in:
Thomas Lau 2021-11-05 15:50:55 +00:00
parent 87b564d609
commit edbc5c78d9
2 changed files with 4 additions and 1 deletions

View File

@ -18,6 +18,8 @@ ARTIST = 'artist'
ARTISTS = 'artists'
ALBUMARTIST = 'albumartist'
ARTWORK = 'artwork'
TRACKS = 'tracks'

View File

@ -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