eyed3 package for Python not properly setting ID3 metadata

半世苍凉 提交于 2019-12-04 17:09:08

I was facing the same problem and finally found the solution on this thread: https://bitbucket.org/nicfit/eyed3/issues/22/tag-save-method-does-not-apply-changes

gist: By default eyed3.load(pathtofile) loads ID3_V2_4 tags, and Explorer and Windows Media Player use 1.x tag.

Solution: Replace your save statement with the following:

   audiofile.tag.save(version=(1,None,None))
   audiofile.tag.save()

The first statement will ensure that the tags used by the explorer and WMP are updated. The second will ensure that the applications using the v2.4 tags also get updated (example VLC). Hope this helps!

EDIT: In the future if you plan to add album-art as well, then you should add the following as well:

    audiofile.tag.save(version=(2,3,0))

Not exactly sure why but updating the v2.3 tags seems to do the job for first time album-art changes.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!