雪豹でlight-playをビルドして、iTunesで保存したALACなアルバムのフォルダーをドラッグ&ドロップで再生できるようにしてみました。
ALPlay
on open theDroppedItems
set atServer to "192.168.0.53"
repeat with a from 1 to count of theDroppedItems
set theCurrentItem to item a of theDroppedItems
tell application "Finder"
set folderContents to every item of theCurrentItem
set thePath to POSIX path of theCurrentItem
repeat with theFile in folderContents
set theName to name of theFile
set cmd to "/Users/hiroki/bin/light-play " & atServer & " \"" & thePath & theName & "\""
--display dialog (cmd)
try
do shell script (cmd)
on error
exit repeat
end try
end repeat
end tell
end repeat
end open
アプリケーションで保存したものにフォルダーをドラッグ&ドロップします。
途中で止めるためのスクリプトも作ってみました。
ALStop
tell application "Finder"
do shell script ("killall light-play")
end tell