python - MP3 标签不保存在 Python 中
问题描述
我正在尝试将 MP3 标签保存到文件夹中的文件中。我已将电子表格中的新值分配给temp_track
如下,但找不到完成最后一步以使用新数据保存文件的方法。
我的代码:
tlt = sheet2.cell(row=a+1, column=14)
temp_track.title = tlt.value
print('Title of Song: ' + temp_track.title)
运行窗口中显示的数据:
Title of Song: (66 REV 022) - Revelation 22
我试过TinyTag.tag.save()
但收到错误消息
AttributeError: type object 'TinyTag' has no attribute 'tag'
可以使用什么属性将新的 MP3 标签保存到文件中?
解决方案
如果您使用来自 pypi https://pypi.org/project/tinytag/或https://github.com/devsnd/tinytag的 TinyTag,则该库仅用于读取。它不能用于修改现有文件。
如果要编辑 mp3 文件的 ID3 标签,请尝试 mp3-tagger https://pypi.org/project/mp3-tagger/或https://github.com/artcom-net/mp3-tagger
推荐阅读
- python - 来自 scipy.stats.probplot 的奇怪行为
- excel - 对两个随机列表进行排序,使其匹配
- qtspim - MIPS 转换数字
- python - 在 Flask 中从 pandas 创建 json.dumps 并使用级联下拉列表生成视图
- php - 所以作曲家需要 rebing/graphql-laravel 失败
- css - CSS:复制 Bootstrap 类 table-sm 并仅适用于移动屏幕
- sql - 是否可以更改由 AVRO 模式文件定义的 EXTERNAL 表上现有列的元数据?
- javascript - Vue Dynamic V-For 显示和隐藏 div
- c# - 如何使用固定元素对通用序列进行排序
- python - 通过文件名创建新列