【问题标题】:Read Rating From ITunes, write it to file从 iTunes 读取评级,将其写入文件
【发布时间】:2015-01-10 23:11:13
【问题描述】:

我在 MacBook Pro 上的 iTunes 中有歌曲,我将这些歌曲从一星评级到五星评级。当我在 DJ 软件中打开歌曲时,它不显示评分,因为 iTunes 不会将它们写入 ID3 标签,而只是将其保存在 iTunes 中。

我发现我可以通过这样做来读取评分:

tell application "iTunes"
    set songRating to get rating of current track
end tell
return songRating

另外,我可以通过以下方式获取位置:

tell application "iTunes"
    set songLocation to get location of current track
end tell
return songLocation

现在如何使用我必须将评分写入文件ID3标签的文件路径?

【问题讨论】:

  • 抓取mutagen(python 模块)。它带有mid3v2。从脚本对该程序进行系统调用,并使用它来修改 POPM 字段,注意带有该字段的 gotchas and inconsistencies。

标签: macos applescript osx-yosemite itunes id3


【解决方案1】:

您可以将评论标签设置为评分,该评分应在 3rd 方应用程序中可读。

例如,

tell application "iTunes"

    set comment of the current track to "rating:" & (get rating of current track)

end tell

评分是百分比值,即 2 星 == 40。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-08-09
    • 1970-01-01
    • 1970-01-01
    • 2016-04-11
    • 1970-01-01
    • 2019-06-28
    • 1970-01-01
    相关资源
    最近更新 更多