使用 python 在 mp3 元数据中添加专辑封面
下面的代码似乎没有更新 mp3 文件的插图。
代码:-
#Editing the MetaData
tag = eyeD3.Tag()
print tag.link('location') //Returns 1
tag.setVersion([2,3,0])
print tag.addImage(0x08,'artwork.jpg') //Return None (Its sure that file is present)
print tag.update() //Returns 1
函数返回的值是正确的,但元数据也没有更新。
可能的原因是什么?
The code below doesnt seem to update the artwork of the mp3 file.
Code:-
#Editing the MetaData
tag = eyeD3.Tag()
print tag.link('location') //Returns 1
tag.setVersion([2,3,0])
print tag.addImage(0x08,'artwork.jpg') //Return None (Its sure that file is present)
print tag.update() //Returns 1
The values returned by the function are correct but then also the metadata is not getting updated.
What can be the possible reasons?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看来您专门指的是使用 eyeD3 模块将图像添加到 MP3 中。我只使用过 eyeD3 的 CLI 版本,所以我可能是错的,但您似乎没有将类型参数传递给 addImage 方法。我不记得在不传递类型的情况下能够让它工作。
http://eyed3.nicfit.net/
It looks like you're specifically referring to adding images to an MP3 using the eyeD3 module. I've only used the CLI version of eyeD3 so I may be wrong, but you don't seem to be passing a type parameter to the addImage method. I don't remember being able to get it to work without passing a type.
http://eyed3.nicfit.net/