boufon
09-28-2005, 08:49 PM
Hi,
I use one of the Doug's Applescripts for iTunes called "Add Selected Local Tracks". I need to modify it so that the
To use this script, the local computer volume must already be mounted 'manually' on the remote server. According to the readme file this 'mountage' step canno't be done automaticaly.
So I decided to make a modification in the " Add Selected Local Tracks" script. Here are the modifications I made in the script :
Step 1: I mount the remote volume on my local volume
Step 2: I create a temp folder (if not already created) into the remote volume.
Step 3: I copy the local track into this temp folder on the remote volume.
Step 4: I ask to itumes (on the remote computer) to load the track from the temp folder in the right playlist.
Step 5 : I ask to the remote Finder to delete the track from the temp folder (on the remote volume.)
By following these steps, it is not necessary for the remote server computer to mount the local volume. This is especially interesting in my case.
I've made some modifications in the " Add Selected Local Tracks " script to behave according to what I describe above. Everything is working fine, except for the step 4. I've not found how to ask to the remote itunes to load the track located in the temp folder. The only solution I found (once the file has been copied into the temp folder) is to call a function add_this_to_remote with 2 parameters :
loc : a string with the fullpathname to the track in the temp folder on the remote computer.
my_playlist : the name of the playlist in which the track must be loaded.
Here is what I've done but it's not correct for 2 raisons :
1/ I don't know how to put the track in the right playlist
2/ the file is playing once it has been loaded in itunes and I just want to load the file into iTunes without playing it
to add_this_to_remote(loc, my_playlist)
tell application "Finder" of machine remMachine
open file loc
delete file loc
end tell
end add_this_to_remote
Could you help me to put the right content in this add_this_to_remote function ?
Thks
I use one of the Doug's Applescripts for iTunes called "Add Selected Local Tracks". I need to modify it so that the
To use this script, the local computer volume must already be mounted 'manually' on the remote server. According to the readme file this 'mountage' step canno't be done automaticaly.
So I decided to make a modification in the " Add Selected Local Tracks" script. Here are the modifications I made in the script :
Step 1: I mount the remote volume on my local volume
Step 2: I create a temp folder (if not already created) into the remote volume.
Step 3: I copy the local track into this temp folder on the remote volume.
Step 4: I ask to itumes (on the remote computer) to load the track from the temp folder in the right playlist.
Step 5 : I ask to the remote Finder to delete the track from the temp folder (on the remote volume.)
By following these steps, it is not necessary for the remote server computer to mount the local volume. This is especially interesting in my case.
I've made some modifications in the " Add Selected Local Tracks " script to behave according to what I describe above. Everything is working fine, except for the step 4. I've not found how to ask to the remote itunes to load the track located in the temp folder. The only solution I found (once the file has been copied into the temp folder) is to call a function add_this_to_remote with 2 parameters :
loc : a string with the fullpathname to the track in the temp folder on the remote computer.
my_playlist : the name of the playlist in which the track must be loaded.
Here is what I've done but it's not correct for 2 raisons :
1/ I don't know how to put the track in the right playlist
2/ the file is playing once it has been loaded in itunes and I just want to load the file into iTunes without playing it
to add_this_to_remote(loc, my_playlist)
tell application "Finder" of machine remMachine
open file loc
delete file loc
end tell
end add_this_to_remote
Could you help me to put the right content in this add_this_to_remote function ?
Thks