Hi,
i think removing Front Row in Lion and Mountain Lion was a mistake from Apple. It was so simple to look films and other medias from one place, instead to throw everything into iTunes. So i cooked my own soup and came up with the script below. Hope, you get some inspiration from it adjusting and adding parts as you like.
#Home Cinema
#VLC
#0,2
-----------------------------------------------------------------------------------
#IDEA:
# plays film stuff at the push of a button
#
#
#REQUISITES:
# Vlc
#
#
#TODO:
#
#
#Made by Joy at 06.08.12
-----------------------------------------------------------------------------------
property del : "_________________________"
property audio_list : {"aiff", "aif", "m3u", "mp3", "mp2", "wav", "wave", "mid"}
property Video_list : {"mov", "avi", "wmv", "swf", "mpg", "flv", "mp4", "key", "m4v", "3gp"} #qt
property genre_fl : ""
tell application "System Events" to set get_vlc to processes whose name is "VLC"
#reset vlc's playlist
if "VLC" is in get_vlc then tell application "VLC" to quit
set genre_fl to ((path to movies folder as text) & "Genre:" as text)
try
do shell script "mkdir -p '" & POSIX path of genre_fl & "'"
end try
set get_genres to (list folder genre_fl without invisibles)
set menu_ls to get_genres & del & "Clips" & "Cine" & "Music" # "Neues Genre" &
set long_dial to tab & tab & "H O M E - C I N E M A" & return & tab & "✠✠✠✠✠✠✠✠✠âœ"
activate
set ch to choose from list menu_ls with prompt long_dial default items (item 1 of menu_ls)
if ch is false or ch is in del then return
set ch to ch as text
if ch is "Clips" then
set {filmbox, ch} to my the_genre(genre_fl)
if filmbox is false then return
my get_film(filmbox, ch)
set lf_genre to list folder filmbox without invisibles
my watch_film(lf_genre, filmbox)
else if ch is "Kino" then
my watch_dvd()
else if ch is "Musik" then
my hear_music()
else
set filmbox to (genre_fl & ch & ":" as text)
set lf_genre to list folder filmbox without invisibles
if lf_genre is {} then
set new_ls to my get_film(filmbox, ch)
my watch_film(new_ls, filmbox)
else
my watch_film(lf_genre, filmbox)
end if
end if
on open these_films
set genre_fl to ((path to movies folder as text) & "Genre:" as text)
set {filmbox, ch} to my the_genre(genre_fl)
if filmbox is false then return
set genre_ls to list folder (genre_fl & ch & ":" as text) without invisibles
if filmbox is false then return
tell application "Finder"
set filmls to {}
repeat with a in these_films
if name extension of a is in Video_list and name of a is not in genre_ls then
make alias file of alias (genre_fl & ch & ":" as text) to a
else
beep
end if
end repeat
end tell
#look film
#my get_film(filmbox, ch)
set lf_genre to list folder filmbox without invisibles
my watch_film(lf_genre, filmbox)
end open
on the_genre(genre_fl)
set film_coll to list folder genre_fl without invisibles
set ch to choose from list film_coll & del & "New Genre" with prompt "Choose Genre"
if ch is false or ch is in del then return {false, false}
set ch to ch as text
if ch is "Neues Genre" then
activate
set ch to text returned of (display dialog "Name your new Film-Genre" default answer "")
if ch is not "" then
do shell script "mkdir -p '" & POSIX path of (genre_fl & ch & ":" as text) & "'"
else
return {false, false}
end if
end if
set filmbox to (genre_fl & ch & ":" as text)
return {filmbox, ch}
end the_genre
on hear_music()
activate
set music_box to choose folder default location (path to desktop folder) with prompt "Choose Music Folder"
if music_box is false then return
set my_files to list folder music_box without invisibles
set ls_files to {}
repeat with a in my_files
set f_pt to (music_box & a as text)
tell application "System Events" to set nex to name extension of alias f_pt
if nex is in audio_list then
set mus_pt to ("'" & POSIX path of f_pt & "' ") as text
copy mus_pt as text to end of ls_files
end if
end repeat
set ls_files to ls_files as text
#open and wait till files aren't open
do shell script "open -a VLC " & ls_files & " ;sleep 0.5"
#start from beginning
tell application "VLC" to next
#hide vlc's interface
tell application "System Events" to set visible of process "VLC" to false
end hear_music
on get_film(filmbox, my_genre)
set ls to list folder filmbox without invisibles
activate
set ch_films to choose file default location (path to desktop folder) with prompt "Choose Film(s) for Genre " & my_genre with multiple selections allowed
tell application "Finder" to repeat with a in ch_films
try
if name extension of a is in Video_list and name of a is not in ls then
make alias file of alias filmbox to a
else
beep
end if
end try
end repeat
return list folder filmbox without invisibles
end get_film
on watch_dvd()
--find dvd
set {myfilm, the_c} to my find_dvd()
if myfilm is {} then
return
else if the_c > 1 then
activate
set my_film to choose from list myfilm with prompt "Choose DVD" default items (item 1 of myfilm)
if my_film is false then return true
set my_film to my_film as text
else
set my_film to item 1 of myfilm
end if
set run_film to POSIX file ("/Volumes/" & my_film as text)
#rebuild media list
tell application "System Events" to set running_apps to name of processes whose background only is false
if "VLC" is in running_apps then tell application "VLC" to if playing is true then quit
tell application "VLC" to open run_film
repeat
tell application "System Events"
if visible of process "VLC" is true then
set visible of process "VLC" to false
exit repeat
end if
end tell
end repeat
tell application "VLC"
#start film
delay 2
repeat
if duration of current item > 0 then exit repeat
end repeat
activate
delay 0.5
fullscreen true
if playing is false then play
end tell
return true
end watch_dvd
on watch_film(new_ls, filmbox)
#play films
activate me
set my_film to choose from list (list folder filmbox without invisibles) with prompt "Choose Film" default items (item 1 of new_ls)
if my_film is false then return
set film_file to (filmbox & my_film as text)
tell application "Finder"
if class of alias film_file is alias file then
try
set run_film to original item of alias film_file
on error
activate
display dialog "FILM NOT FOUND!" & return & return & "\"" & my_film & "\"" & return & return & "Search on:" & return & "¢ Computer" & return & "¢ Mounted Drives" & return & "¢ Sticks" buttons "Ende" with icon 2
return
end try
else
set run_film to alias film_file
end if
end tell
activate
my hide_others()
tell application "System Events" to set running_apps to name of processes whose background only is false
if "VLC" is in running_apps then tell application "VLC" to if playing is true then quit
activate
display dialog "VLC is really slow loading DVD's. Please be patient-your Film will start automatically." with icon 1 buttons {"Continue", "Cancel"}
set the_b to the button returned of the result
if the_b is "Cancel" then return
tell application "VLC" to open run_film
repeat
tell application "System Events"
if visible of process "VLC" is true then
set visible of process "VLC" to false
exit repeat
end if
end tell
end repeat
tell application "VLC"
#start film
delay 2
repeat
if duration of current item > 0 then exit repeat
end repeat
activate
delay 0.5
fullscreen true
if playing is false then play
end tell
end watch_film
on hide_others()
#hide distracting apps
tell application "System Events"
set proc_others to application processes whose background only is false
repeat with a in proc_others
if name of a is not in {"VLC"} then #"QuickTime Player"
set visible of a to false
end if
end repeat
end tell
end hide_others
on find_dvd()
set {get_disks, the_c} to {{}, {}}
repeat 30 times
set {get_disks, the_c} to my get_infos()
if {get_disks, the_c} is not {false, false} then exit repeat
do shell script "sleep 2"
end repeat
return {get_disks, the_c}
end find_dvd
on get_infos()
try
tell application "Finder" to set get_disks to name of (disks whose ejectable is true and free space is 0)
on error
set get_disks to {}
end try
if get_disks is not {} then
set the_c to (count get_disks)
else
return {false, false}
end if
return {get_disks, the_c}
end get_infos