GiddyHeaD
GiddyHeaD

Reputation: 49

MP3 Tags Not Saving in Python

I'm trying to save MP3 Tags to files in a folder. I have assigned new values from the spreadsheet to the temp_track as below but could not find a way to finish the last step to save the files with the new data.

My code:

tlt = sheet2.cell(row=a+1, column=14)
            temp_track.title = tlt.value
            print('Title of Song: ' + temp_track.title)

Data that shows in the run window:

Title of Song: (66 REV 022) - Revelation 22

I have tried TinyTag.tag.save() but got the error message

AttributeError: type object 'TinyTag' has no attribute 'tag'

What attribute can be used to save the new MP3 Tags to the files?

Upvotes: 3

Views: 425

Answers (1)

Josiah Bradley
Josiah Bradley

Reputation: 353

If you are using TinyTag from pypi https://pypi.org/project/tinytag/ or https://github.com/devsnd/tinytag that library is for reads only. It can not be used to modify an existing file.

If you want to edit the ID3 tags for an mp3 file, try mp3-tagger https://pypi.org/project/mp3-tagger/ or https://github.com/artcom-net/mp3-tagger

Upvotes: 3

Related Questions