【问题标题】:iTunes Com Interface The track is not modifiableiTunes Com 界面 曲目不可修改
【发布时间】:2015-08-13 23:07:55
【问题描述】:

我通过com接口向iTunes添加了一个文件,并在里面写了一条评论,但有时在写cmets的时候出现错误-

com_error: (-2147352567, '\xce\xf8\xe8\xe1\xea\xe0.', (0, None, u'The track is not modifiable.', None, 0, -1610350077), None)

代码:

def addFile(playlist, filePath, comment):

        IITUserPlaylist = win32com.client.CastTo(playlist, 'IITUserPlaylist')
        resultAdd = IITUserPlaylist.AddFile(filePath)

        if resultAdd == None: return False      #Bad filePath

        while resultAdd.InProgress == True:     #Wait adding files
            print("adding file")

        for number in range(1, resultAdd.Tracks.Count + 1):
            currentTrack = resultAdd.Tracks.Item(number)
            if currentTrack.Kind == 1:
                currentTrack = comment          #Add comment to track 

        return True

我认为问题在于此时iTunes处理曲目,因为重新启动时可能不会出现脚本错误。最重要的是,我做错了测试:

    while resultAdd.InProgress == True:     #Wait adding files
        print("adding file")

但是我在文档中没有找到其他的方法。

对不起,我英语不好。

【问题讨论】:

  • "itunce" - iTunes?!我的意思是,它就在您使用的标签中就在那里
  • 是的,对不起,我打错了
  • 根据经验发现只有在添加没有id3标签的曲目时才会出现错误

标签: python com itunes itunes-sdk


【解决方案1】:

我很确定您的文件是只读的。

来源:遇到同样的问题

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-03-20
    • 2012-06-20
    • 1970-01-01
    • 2011-08-22
    • 1970-01-01
    • 2015-11-23
    • 2011-02-14
    • 2016-01-10
    相关资源
    最近更新 更多