An AppleScript to move video from EyeTV to iTunes
Oct 13, '06 07:30:04AM
Contributed by: Anonymous
I'm trying to integrate EyeTV with our lives in the most spousal-friendly way possible. Since my spouse has recently been seen happily watching Oprah using Front Row from the treadmill, I thought it was time I shared my work. Using EyeTV is easy. Setting up a scheduled, repeating recording is easy. Telling EyeTV to 'Export to iPod' automatically is easy.
Getting iTunes to automatically import and correctly organize the video is tricky.
The last step of EyeTV's 'Export to iPod' process is supposed to import to the EyeTV playlist to iTunes. But that isn't working for me right now. Also, iTunes has the very handy ability to organize your TV shows by show and episode, but EyeTV exported videos are handled as simple movies instead.
So I wrote an AppleScript to:
- Get all the files in your Movies directory (EyeTV's default location for exported video files)
- Filter out any that don't end in .m4v (EyeTV's default file extension for exported video files)
- Filter out any that have been modified in the last few minutes (still being exported)
- Add them to the EyeTV playlist in iTunes (must exist already)
- Set the iTunes 'video kind' tag to 'TV show'
- Parse the filename into the 'show' and 'name' iTunes video tags
- Stick the original name in the comments field, just in case
- Delete the original file
I also then made a short Automator workflow to run the script, pause for 10 minutes, and then run 'this' workflow (endless loop). I couldn't get Folder Actions to work well, since the video files are added to your Movies directory long before they're completed. I hope that Elgato obsoletes this entire hint in a near-future version of their software. Also, I'd love to post this in an EyeTV-centric forum, but I can't find one.
This is fairly new development. Please post back with improvements.
Comments (7)
Mac OS X Hints
http://hints.macworld.com/article.php?story=20061004084252194