Created
November 20, 2011 18:44
-
-
Save pajp/1380682 to your computer and use it in GitHub Desktop.
Encode mkv files to Apple TV format and add them to iTunes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Moved here: https://github.com/pajp/add-to-itunes |
And one more thing: when processing command line arguments with a for loop, just "for f; do" is enough.
Thanks for the comments!
Yes, the timeout is there because the default timeout of 2 seconds (or so) is not enough since my iTunes is configured to copy the added file to the iTunes media library (1080p content often weighs in on a gigabyte or two). And if I googled properly "ignoring application responses" would make the add return immediately. However, I actually want it to block until the media has been added so that I can safely rm it afterwards. But please do correct me if I'm wrong. :-)
No, you're right. I don't know of a good way around that. Probably best the way you did it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hmm... If you added the timeout because osascript complains if iTunes takes too long to answer, consider using "ignoring application responses" block around the tell.