Advertisement
Guest User

Untitled

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