don't try to tag unnecessarily
This commit is contained in:
parent
56635b60f1
commit
9471aad4ba
1 changed files with 7 additions and 1 deletions
|
@ -208,7 +208,13 @@ class DelojzaBot:
|
|||
filenames.append(final_filename)
|
||||
|
||||
if audio and is_mp3:
|
||||
self.tag_file(final_filename, message)
|
||||
try:
|
||||
id3 = mutagen.id3.ID3(final_filename)
|
||||
untagged = 'TIT2' not in id3
|
||||
except mutagen.id3.ID3NoHeaderError:
|
||||
untagged = True
|
||||
if untagged:
|
||||
self.tag_file(final_filename, message)
|
||||
|
||||
return filenames
|
||||
|
||||
|
|
Loading…
Reference in a new issue