Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Get a list of movies in the iTunes movies folder.
- tell application "Finder" to set movieList to name of every folder of folder "Music:iTunes:iTunes Music:Movies" of home
- -- Prompt with a list of movies, get the user's selection.
- set movieName to choose from list movieList with prompt "Which movie do you want to shift TO appletv.local?"
- -- Did the user select a movie, if they did - continue, otherwise exit.
- if movieName is not false then
- tell application "Terminal"
- activate
- -- Change to the movie directory.
- do script "cd 'Music/iTunes/iTunes Music/Movies/" & movieName & "'" in front window
- -- Run the copy command.
- do script "scp '" & movieName & ".m4v' 'frontrow@appletv.local:/mnt/Media/Purchased\\ Files'" in front window
- -- Wait 5 seconds (allow for connection) then enter the AppleTV password.
- delay 5
- do script "frontrow" in front window
- end tell
- else
- -- No movie selected, exit.
- display dialog "You didn't select a movie, goodbye!" buttons "OK" default button "OK" with icon 2
- end if
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement