Page 1 of 1

Importing movies to iTunes Library without copying

PostPosted: Sat Oct 25, 2008 10:47 am
by aperley
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!

Re: Importing movies to iTunes Library without copying

PostPosted: Mon Oct 27, 2008 3:14 pm
by Mr_Noodle
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.

Re: Importing movies to iTunes Library without copying

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

Re: Importing movies to iTunes Library without copying

PostPosted: Thu Oct 30, 2008 12:05 am
by aperley
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?

Re: Importing movies to iTunes Library without copying

PostPosted: Thu Oct 30, 2008 12:18 am
by aperley
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:

Re: Importing movies to iTunes Library without copying

PostPosted: Thu Oct 30, 2008 12:32 am
by edalzell
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.

Re: Importing movies to iTunes Library without copying

PostPosted: Thu Oct 30, 2008 12:40 am
by aperley
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!

Re: Importing movies to iTunes Library without copying

PostPosted: Thu Oct 30, 2008 1:16 am
by edalzell
Here is where I got the script from: http://dettmer.maclab.org/movie2itunes.html

Re: Importing movies to iTunes Library without copying

PostPosted: Wed Oct 13, 2010 3:53 am
by gcoghill
Any word on whether or not Hazel can/will support this?

Re: Importing movies to iTunes Library without copying

PostPosted: Wed Oct 13, 2010 4:09 am
by gcoghill
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

Re: Importing movies to iTunes Library without copying

PostPosted: Tue Oct 19, 2010 4:08 pm
by Mr_Noodle
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.

Re: Importing movies to iTunes Library without copying

PostPosted: Tue Oct 19, 2010 4:36 pm
by gcoghill
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 :(

Re: Importing movies to iTunes Library without copying

PostPosted: Thu Oct 21, 2010 11:30 am
by Mr_Noodle
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.

Re: Importing movies to iTunes Library without copying

PostPosted: Thu Oct 21, 2010 12:03 pm
by gcoghill
Thanks again for looking into this.