Importing movies to iTunes Library without copying

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Hey there,

I would like to have Hazel automatically add the new movies to the iTunes Library, but without actually copying the file to iTunes Music folder. I know there is a setting in iTunes that allows you to control such behavior, but I do like to keep it for everything I add to the library, except movies. There is also a shortcut - if you hold 'Option' while dragging the file (movie file, in my case) on iTunes icon, it overrides the preset behavior and adds the file to the library as a reference, leaving the actual file wherever it is.

My question is: is there a way to emulate such "Option-dragging" in Hazel rule? Perhaps, via AppleScript or something? Any ideas?

Many thanks!
aperley
 
Posts: 4
Joined: Sat Oct 25, 2008 10:28 am

Right now, it's based on your iTunes settings. I didn't know about the "option" thing to prevent it from copying. I've added an entry in the feature database to research whether this is possible via AppleScript. I'll try and report back if I find anything.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

I have a script that creates a MOV container and imports that into iTunes. Lets you leave your movie where they are.
edalzell
 
Posts: 13
Joined: Wed Oct 29, 2008 11:43 pm

edalzell wrote:I have a script that creates a MOV container and imports that into iTunes. Lets you leave your movie where they are.


edalzell,

Can you share some additional details? I understand the container creation part, but how exactly does your script get around iTunes setting to Copy files to iTunes Music folder when adding to library?
aperley
 
Posts: 4
Joined: Sat Oct 25, 2008 10:28 am

Mr_Noodle wrote:I didn't know about the "option" thing to prevent it from copying.


Mr_Noodle,

Yes, this trick has been floating around for some time - can't locate the original discoverer, but it's been echoed in various places, like this: http://murphymac.com/itunes-storage-location-exceptions/.

That's exactly what I need for my movies kept on the external drive - iTunes behaves amazingly smart with such entries and doesn't fret when the drive is disconnected. It also allows you to add nice DVD covers, which I believe are stored in it's database. Overall, a nice way to keep the movie collection. If I could only figure out a way to do this via Hazel rule... :roll:
aperley
 
Posts: 4
Joined: Sat Oct 25, 2008 10:28 am

aperley wrote:
edalzell wrote:I have a script that creates a MOV container and imports that into iTunes. Lets you leave your movie where they are.


edalzell,

Can you share some additional details? I understand the container creation part, but how exactly does your script get around iTunes setting to Copy files to iTunes Music folder when adding to library?


The container file is just a link file...like 4k big. It doesn't move the main file...just the link file.

Perhaps this isn't what you want.
edalzell
 
Posts: 13
Joined: Wed Oct 29, 2008 11:43 pm

edalzell wrote:The container file is just a link file...like 4k big. It doesn't move the main file...just the link file.

Perhaps this isn't what you want.


Gotcha. Yeah, I heard about this trick, but never thought about using it for my purpose. I'll do some googling around and give it a shot. Thanks for the idea!

If there are any AppleScript gurus here who might know about more straightforward approach, please drop a line!
aperley
 
Posts: 4
Joined: Sat Oct 25, 2008 10:28 am

Here is where I got the script from: http://dettmer.maclab.org/movie2itunes.html
edalzell
 
Posts: 13
Joined: Wed Oct 29, 2008 11:43 pm

Any word on whether or not Hazel can/will support this?
gcoghill
 
Posts: 290
Joined: Tue Sep 18, 2007 8:09 am
Location: Kent, OH

Here is some info on emulating key presses in AppleScript. I'm not enough of an AppleScript wiz to do anything with them though:

http://dougscripts.com/itunes/itinfo/keycodes.php
gcoghill
 
Posts: 290
Joined: Tue Sep 18, 2007 8:09 am
Location: Kent, OH

It's probably not a stable solution to use AppleScript to emulate key presses. I have to say I haven't had a chance to look at this in more detail as I'm working on 3.0. Even if I had the time, it probably won't be released anytime soon. Sorry about that.

For now, if you want to try it using key presses, you can do your own script (or find someone that can do it for you). For Hazel, though, such an approach is not ideal for production use and I'd be wary of the risks of shipping something like that.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

I wonder if there's a command in AppleScript that specifies a move instead of a copy into iTunes? Again, an amateur with AppleScript. Not even sure how to find out if that's possible :(
gcoghill
 
Posts: 290
Joined: Tue Sep 18, 2007 8:09 am
Location: Kent, OH

I don't see anything there. The actions seem to deal with moving things to libraries and playlists but I don't see anything about how to manage the actual files in the filesystem.

Probably the best thing to do is to start bugging Apple to add this type of functionality to iTunes' Applescript.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Thanks again for looking into this.
gcoghill
 
Posts: 290
Joined: Tue Sep 18, 2007 8:09 am
Location: Kent, OH


Return to Support