HI there,
I want to do the following:
After a BitTorrent download complete uTorrent automatically moves it to a folder named COMPLETED.
From here I want to move any mp4 encoded movie files to the “Automatically Add to iTunes” Folder, as well as any mp3 (or other music) files.
I want to transcode all other movie files (e.g. AVI, MKV) to MP4, the apple TV3 format. I found an Applescript to do this last part with handbrake CLI. Not sure if it works though. (see below)
Once the files are encoded in the right format I want to move them to the “Automatically Add to iTunes” Folder too.
Now I want to delete any left overs (empty folders, txt files, subtitle files etc.).
Any hints on how to get this automated through KM? Below is the apple script with link to the hazel forum where I found it, that should take care of the handbrake part, but the other (KM) parts I am still unclear how to best solve them. Any hints are welcome
#source: http://www.noodlesoft.com/forums/viewtopic.php?f=2&t=3936&hilit=handbrake
tell application "Finder"
try
--Set to red label to indicate processing
set label index of theFile to 2
--Assemble original and new file paths
set origFilepath to quoted form of POSIX path of (theFile as alias)
set newFilepath to (characters 1 thru -5 of origFilepath as string) & "m4v'"
--Start the conversion
set shellCommand to "nice /Applications/HandBrakeCLI -i " & origFilepath & " -o " & newFilepath & " --preset=\"AppleTV 3\" ;"
do shell script shellCommand
--Set the label to orange
set label index of theFile to 3
end try
end tell
tell application "Finder"
set movieName to name of item theFile
end tell