kevinhoagland wrote:Somewhat of a Hazel noob here, I'm trying to figure out how to automate my torrent downloads.
Right now, I have 4 seperate rules.
One watches ~/Downloads for .torrents, adds them to Transmission and then deletes them from ~/Downloads and Growls me. This one works afaik.
http://cl.ly/3FEyI then have two to delete .nfo and .m3u files from the downloaded folders. Here is the nfo one (replace nfo with m3u for the other). They don't work.
http://cl.ly/3FDZI have one more, the most important one, that I can't figure out at all. I want it to see a downloaded folder, go into it, take all the music files (always mp3s) and import them into my iTunes library, then delete the original mp3s as well as the folder they were downloaded in. It should then tell me it imported the folder to iTunes. I cannot figure this out. Can anyone help?
http://cl.ly/3EpgThank you in advance for any help you can offer.

Your trying to do too much in one rule. I always opt for more rules cause its easier in my mind and more flexible (at least until hazel is updated)
Not quite sure your setup so ill make a few assumptions. You download torrents to folder Downloads (u said this). Transmission downloads your files to another folder called Competed Downloads. Now the rules all run on the Completed Downloads Folder.
It sounds like all the downloads come as folders with contents in each folder so for example in the Completed Downloads folder you would have Folder A, Folder B, Folder C, etc each with MP3, NFO, and M3U files. So i would do this in order:
Go into SubfoldersIf all conditions met:
Kind is FolderDo the following:
Run rules on folder contentsImport MP3s to iTunesIf all conditions met:
Extension is MP3Do the following:
Import into iTunes to playlist LibraryMove file to folder TrashTrash Remaining Contents [NOTE: I am assuming that basically after you import the MP3 you want to trash the entire folder (ie Folder A and all its remaining contents which would be NFOs and M3Us)
If all conditions met:
Extension is not MP3 [To ensure the MP3 action has occurred and then subsequently trashed]
Do the following:
Run Applescript embedded scripttell application "Finder"
set posix_parent_dir to POSIX path of (container of (item theFile) as text)
end tell
return {hazelSwitchFile:posix_parent_dir}Move file to folder TrashThe applescript above brings you out of each folder and back up to the parent folders. Seems much easier to just trash the whole folder instead of the contents first and then the folder.
Let me know if this helps...