【问题标题】:Trying to Add Episode ID to TV Shows via Applescript in iTunes尝试通过 iTunes 中的 Applescript 将剧集 ID 添加到电视节目
【发布时间】:2013-01-21 03:31:19
【问题描述】:

我有以下代码:

tell application "iTunes"
repeat with thetrack in tracks of playlist "foo"
    set showName to name of thetrack
    set showName to ((characters 17 through -1 of showName) as string)
    set episode ID of thetrack to name of thetrack
end repeat
end tell

我正在尝试将电视节目的剧集 ID 设置为曲目名称。如果我注释掉 set episode ID 行,showName 肯定会设置为正确的字符串。当我尝试实际设置剧集 ID 时,我收到以下错误:

iTunes 出现错误:无法将播放列表“Fitness & Nutrition”的每个曲目的第 1 项的剧集 ID 设置为播放列表“Fitness & Nutrition”的每个曲目的第 1 项的名称。

我承认,我被难住了。

【问题讨论】:

    标签: applescript itunes


    【解决方案1】:

    试试:

    set episode ID of thetrack to (name of thetrack as text)
    

    因为

    return class of name of thetrack --> property
    

    return class of (name of thetrack as text) --> text
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-09-11
      • 1970-01-01
      • 2013-08-29
      • 2012-09-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多