Miro and Automator
From Miro User Documentation
Here's an automator workflow I created that will import a movie into iTunes every time the Miro downloads folder gets a new movie. This is compatible with avi, flav, divx, and whatever else Quicktime has a plugin for. It also keeps movies in the original Miro folder where Miro can keep seeding them. What is DOES NOT DO is give the movie a more friendly file name or any metadata besides what's original. If you have any ideas for accomplishing that, let me know. Hope this helps someone:
http://masheach.googlepages.com/workflow.zip
Here's a walk through because it's not all obvious:
1 Get specified finder items. Set to your Miro download folder. This is optional for a Folder Action, but I like it for testing purposes. I could also choose to run the workflow every x minutes instead of as a folder action. Note that it does NOT include subfolders which is good. That means it won't include the incomplete downloads subfolder.
2 Filter from Finder Label. Downloaded from http://automatoractions.com/files/filterfromfinderlabel1.0.html At the end of the workflow, I label every imported file purple (you can use anything, of course). So in the beginning I filter only the files that aren't purple to avoid selecting any files already imported. (Warning: I had some strange errors with the action wanting to know the location of Photoshop???)
3 Open Finder Items. This one's tricky! You could just open the file with iTunes which will import and then start playing. First, I don't want to play a movie right away. Second, only standard iTunes formats are supported. Instead, I open with an AppleScript packaged as an app called Movie2iTunes.app written by a kind guy at http://dettmer.maclab.org/movie2itunes.html. This does two things:
- 3a) First, ceate a reference movie for every movie and stores that movie in a folder. The first time it runs, the script will prompt for the location and you can reset it at any time by running the script without inputting movies. I set mine inside the Miro download folder.
- 3b) Second, the script imports the reference file(s) into iTunes. However, the script has a dialog box at the end telling you everything went OK and that's a problem because the script won't start again until "OK" is pressed. I told the author who was nice enough to give me a version with a voice dialog instead of a window. (I later found that a packaged script has the original script inside, so I could have done it myself. If the voice gets annoying, I may take that out too.)
4 Label Finder items. Label the imported movie purple as specified earlier. The rest of the steps are optional.
5 Show Growl Notification. A special action available if you have the Growl notification software installed. Good for testing and won't show up in Front Row.
6 Get specified items (ignoring items from previous actions), 7 Get Folder Contents and 8 Move to trash. Those quicktime reference movies created by Movies2iTunes are copied into iTunes (if the option is enabled in iTunes' preferences), so the original reference movies have no value. They don't hurt anything, except taking up a little disk space, but I'm a control freak so I delete them.
Source: http://www.getmiro.com/forum/comments.php?DiscussionID=268&page=1 by Ephilei

