【发布时间】:2017-06-11 04:14:53
【问题描述】:
我正在尝试检查哪些曲目位于我的 iTunes 库目录中,哪些没有使用 AppleScript。
以下脚本真的慢每首曲目大约需要 2 秒(库中大约有 8000 首曲目):
#!/usr/bin/osascript
tell application "iTunes"
repeat with l in (location of every file track)
set fileName to (POSIX path of l)
if fileName does not start with "/Users/user/Music/iTunes/iTunes Media/" then
log fileName
end if
end repeat
end tell
还尝试了以下,但性能相同:
#!/usr/bin/osascript
tell application "iTunes"
repeat with l in (location of every file track)
POSIX path of l does not start with "/Users/user/Music/iTunes/iTunes Media/"
end repeat
end tell
与此同时,iTunes 变得非常迟钝。
一定是在做傻事,但不知道是什么。
这是在 2015 27' iMac 上的 OS X El Capitan 下。
任何帮助表示赞赏。
干杯
【问题讨论】:
标签: performance applescript itunes osx-elcapitan