Dammit, iTunes

Why isn't "video kind" settable any more? This had been working for years, and stopped a couple of weeks ago, but it's 12.4.0.119 which hasn't been updated since May.

osascript -e 'tell application "iTunes" to tell first file track whose database ID is 2746419 to video kind'
music video

osascript -e 'tell application "iTunes" to tell first file track whose database ID is 2746419 to set video kind to music video'
87:97: execution error: iTunes got an error: Parameter error. (-50)

osascript -e 'tell application "iTunes" to tell first file track whose database ID is 2746419 to set video kind to podcast'
87:97: execution error: iTunes got an error: Parameter error. (-50)

osascript -e 'tell application "iTunes" to tell first file track whose database ID is 2746419 to set video kind to "music video"'
87:97: execution error: iTunes got an error: A descriptor type mismatch occurred. (-10001)

osascript -e 'tell application "iTunes" to tell first file track whose database ID is 2746419 to set video kind to "podcast"'
87:97: execution error: iTunes got an error: A descriptor type mismatch occurred. (-10001)

osascript -e 'tell application "iTunes" to tell first file track whose database ID is 2746419 to set video kind to 0'
87:97: execution error: iTunes got an error: Parameter error. (-50)

Previously, previously, previously, previously, previously, previously.

Tags: , , ,

7 Responses:

  1. Dg says:

    No quotes around the type:

    osascript -e 'tell application "iTunes" to tell first file track whose database ID is 34622 to set media kind to music video'

    • Dg says:

      (caveat - this was under macOS sierra beta somethingorother w/iTunes 12.5.0.6.8 so YMMV)

    • jwz says:

      You're right, my test was wrong. But it still doesn't work. Updated.

      • Dg says:

        When I use:

        osascript -e 'tell application "iTunes" to tell first file track whose database ID is 34622 to set video kind to music video'

        I get the parameter error, but when I set media kind instead of video kind, then it works

        osascript -e 'tell application "iTunes" to tell first file track whose database ID is 34622 to set media kind to music video'

        • jwz says:

          Hey, that works. Thanks.

          Complete mystery why the other way magically stopped working, especially since as far as I can tell, my copy of iTunes has not been updated in months.

          • Nate says:

            iTunes is HTML/JS under the covers. Look at the widgets via an inspector and there's a point at which you step off from firm ground and into HTMLView land.

  • Previously