【问题标题】:Identifying repeat tracks on iTunes script识别 iTunes 脚本上的重复曲目
【发布时间】:2018-03-26 13:06:01
【问题描述】:

(很沮丧,我想不出用 'where...' 命令来做到这一点。) 如何将 iTunes 库中的歌曲添加到我的播放列表 xMusic,以确保它尚未添加? 目前我有一个“添加一些流派为...的歌曲”命令,然后是一个单独的脚本来删除重复项,但我宁愿确保我一开始就没有添加重复项。 有没有办法我可以写类似“将歌曲设置为播放列表音乐中的某首歌曲,其类型为摇滚且名称不是{浏览迄今为止添加到 xMusic 的所有其他曲目的标题} 将歌曲复制/复制到 xMusic'。

【问题讨论】:

    标签: applescript itunes


    【解决方案1】:
        use application "iTunes"
    
    
        set thePlaylistThatNeedsMoreSongs to user playlist "Music To Die To"
            --> user playlist id 22255 of source id 66 of application "iTunes"
    
        set theSongIWantToAdd to the first file track whose artist is "Raign"
    
        -- These are the playlists that contain theSongIWantToAdd
        playlists of theSongIWantToAdd
            --> {user playlist id 20895 of source id 66 of application "iTunes",¬
            --> user playlist id 22255 of source id 66 of application "iTunes"}
    
        -- Now check if thePlaylistThatNeedsMoreSongs is in that list:
        id of thePlaylistThatNeedsMoreSongs is in id of playlists of theSongIWantToAdd
    
        if the result is true then
            "Pick another track"
        else
            add theSongIWantToAdd to thePlaylistThatNeedsMoreSongs
        end if
    

    这是你想要的吗?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-02-14
      • 1970-01-01
      • 2018-08-11
      • 1970-01-01
      • 2012-11-20
      • 1970-01-01
      • 2016-05-13
      • 2013-01-25
      相关资源
      最近更新 更多