fix setting tag v2
This commit is contained in:
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user