fix setting tag v2

This commit is contained in:
SemvdHoeven
2026-02-11 11:30:04 +01:00
parent 00125b1f3f
commit 9dd4f2318e

View File

@@ -292,7 +292,9 @@ def check_artist_songname(x: str, audio):
# Set both TPE1 (song artist) and TPE2 (album artist) # Set both TPE1 (song artist) and TPE2 (album artist)
audio["TPE1"] = TPE1(encoding=3, text=artist) audio["TPE1"] = TPE1(encoding=3, text=artist)
audio["TPE2"] = TPE2(encoding=3, text=artist) audio["TPE2"] = TPE2(encoding=3, text=artist)
audio["artist"] = artist # Only set 'artist' as a string for FLAC, not for MP3
if hasattr(audio, 'mime') and audio.mime and 'flac' in audio.mime[0].lower():
audio["artist"] = artist
logging.info(f"Set artist tags TPE1 and TPE2 to {artist}") logging.info(f"Set artist tags TPE1 and TPE2 to {artist}")
def check_artist(audio, filename: str) -> bool: def check_artist(audio, filename: str) -> bool: