itunes libraries

Hello mellow fellow maclers,
I was googling for quite some time now for a solution to my problem; I have an ibook g4 with a 60gig drive and an external 250gig drive… my music collection has grown beyond what my ibook can handle so i had to move it all to my external - so far so good. My problem, and i thought you clever guys here at macscripter would definatly come up with some ingenious solution, is that i’d like a second library for on-the-go and i would like itunes to open the full library if my external HD is present and open the on-the-go library if it isnt… I tried automator but it doesnt seem to be able to do anything usefull in that direction except; Run apple script: :stuck_out_tongue: any help would be greatly appreciated!!

Thanx in advance, Tfelder

Model: iBook G4
Browser: Safari 412
Operating System: Mac OS X (10.4)

I created a little routine (from this post) that works as follows: It opens iTunes and checks the disks on the desktop. If a targeted one exists, iTunes imports the songs from whatever file/ folder I select. It creates them as a playlist. I couldn’t import an additional “library playlist” which is identified as “a master library list”. In the dictionary it refers to a plural form, “library playlists”, so it looks like you are allowed more than one. Any suggestions?
SC

What I would do is create a stay-open script that watches for new disks every 10 seconds or so and, if your external drive is attached, quit iTunes (if running), swap the iTunes 4 Music Library files to/from a standard place (a subfolder in Application Support makes sense), and then relaunch iTunes. In this way you could have iTunes know about two (or more) libraries and make sure only the library appropriate for the available tracks is used. Here’s a basic script for checking if a disk has been mounted or ejected:

property last_disk_check : {}
property display_alert : true

on run
	set last_disk_check to list disks
end run

on idle
	set current_disk_check to list disks
	if current_disk_check is not last_disk_check then
		if (count current_disk_check) > (count last_disk_check) then
			set the_action to "mounted"
			set new_disk to my find_difference(current_disk_check, last_disk_check)
		else
			set the_action to "ejected"
			set new_disk to my find_difference(last_disk_check, current_disk_check)
		end if
		if display_alert then
			tell application "System Events"
				activate
				set the_button to button returned of (display dialog "The disk \"" & new_disk & "\" was " & the_action & ". Should I continue checking for disk mount activity?" buttons {"No", "Yes"} default button 2 with icon 1 giving up after 10)
			end tell
			if the_button = "No" then quit
		end if
		set last_disk_check to current_disk_check
		if the_action = "mounted" then
			--do something 
		else
			--do something else
		end if
	end if
	return 10 --seconds
end idle

on find_difference(list_a, list_b)
	repeat with this_item in list_a
		set this_item to contents of this_item
		if this_item is not in list_b then return this_item
	end repeat
end find_difference

You can add the code to quit iTunes (if running) and swap the library files into the template above.

Jon

So then, is “iTunes can only access one master library at a time” true? And hey Jonn, what ever happened with Alpha Viewer? Could it be made for use with DVD player to keep the movie window at the front of the finder at all times?
SC

Hrmm… hanx a LOT for the script (my knowledge of applescipt goes so far that i can code (really) simple stuff and understand most other things) but i just dont know how to make applescript swap library files… HELP! (almost there though)

SC,

I’ve been busy with some other projects and haven’t had time to to follow-though with AlphaViewer. Hopefully I’ll be able to get back to it soon. When finished, it may provide limited support for QuickTime media but it won’t do what you want for DVD Player (well, I’m not exactly certain what you want to do with DVD Player but since AlphaViewer will have no interaction with DVD Player at all, I’m fairly confident it won’t do what you want). DVD Player has settings for running in full-screen, kiosk mode and you can further quit other applications (including the Finder) to keep it frontmost like you want.

Jon

John8, basically, I’m trying to keep a Half Size (smallest) DVD Player Viewer Window in the corner of my screen to play movies while I’m working in other applications. This would be best compared to how Date & Time offers the ability to display an analog or digital clock in a window in front of any other applications. This way, when switching between programs while working, the movie will still be visible and not moved behind the front-most application.

sitcom, thanks for being an advocate to my cause. I’m sorry, but I’m not a programmer by any means. Just a scavenger. But when I couldn’t successfully Google an applescript already written, I turned to the source. You guys really know what you’re doing and I appreciate any help that you could offer me.

Thanks so much!
slimjim5811

p.s. thomas_felder, sorry I intruded on your iTunes post.