···461461462462on getiTunesInfo()
463463 set theList to {}
464464+ set currentState to "stopped"
465465+ set currentSongStar to "0"
466466+ set currentSongRate to 0
467467+ set songID to 1
468468+ set currentSongPosition to "0"
469469+ set artistName to ""
470470+ set trackName to ""
471471+ set albumName to ""
472472+ set trackDur to 0
473473+464474 using terms from application "iTunes"
465475 tell application "iTunes" of machine fullMachineURI
466476 if player state is playing then
···481491 set trackName to name of current track
482492 set albumName to album of current track
483493 set trackDur to duration of current track
484484- else if player state is stopped then
485485- set currentState to "stopped"
486486- set currentSongStar to "0"
487487- set songID to 1
488488- set currentSongPosition to "0"
489489- set artistName to ""
490490- set trackName to ""
491491- set albumName to ""
492492- set trackDur to 0
493494 end if
494495495496 set currentPlaylist to name of view of first browser window
···532533 set contents of text field "tf-artist" of window "win-main" to artistName of cachedTrackInfo
533534 set contents of text field "tf-title" of window "win-main" to trackName of cachedTrackInfo
534535 set contents of text field "tf-album" of window "win-main" to albumName of cachedTrackInfo
535535- set title of window "win-main" to "< " & artistName of cachedTrackInfo & " - " & trackName of cachedTrackInfo & " >"
536536+ try
537537+ set title of window "win-main" to artistName of cachedTrackInfo & " - " & trackName of cachedTrackInfo
538538+ on error
539539+ set title of window "win-main" to "Unknown"
540540+ end try
536541 set tool tip of text field "tf-artist" of window "win-main" to artistName of cachedTrackInfo
537542 set tool tip of text field "tf-title" of window "win-main" to trackName of cachedTrackInfo
538543 set tool tip of text field "tf-album" of window "win-main" to albumName of cachedTrackInfo