Clear the tags before tagging

This fixes #1
This commit is contained in:
RemixDev 2020-05-26 11:31:20 +02:00
parent 1b993f6592
commit 68039365e8
1 changed files with 3 additions and 1 deletions

View File

@ -7,6 +7,7 @@ from mutagen.id3 import ID3, ID3NoHeaderError, TXXX, TIT2, TPE1, TALB, TPE2, TRC
def tagID3(stream, track, save): def tagID3(stream, track, save):
try: try:
tag = ID3(stream) tag = ID3(stream)
tag.delete()
except ID3NoHeaderError: except ID3NoHeaderError:
tag = ID3() tag = ID3()
@ -74,7 +75,8 @@ def tagID3(stream, track, save):
def tagFLAC(stream, track, save): def tagFLAC(stream, track, save):
tag = FLAC(stream) tag = FLAC(stream)
tag.delete()
tag.clear_pictures()
if save['title']: if save['title']:
tag["TITLE"] = track['title'] tag["TITLE"] = track['title']
if save['artist']: if save['artist']: