dougscripts.com

December 3 2012 - 9:42 am

Go to Current Song and reveal Busted in iTunes 11

The menu command "Go to Current Song" (in the Controls menu of iTunes 11) indeed shows the playlist that the current song is playing from, but it does not select the current playing track. The Command-L keyboard shortcut no longer works either. Looking for an AppleScript workaround, I found that reveal current track behaves the same way. The reveal command still selects a playlist, eg: reveal current playlist.

Update: Apparently these fails happen when a song is playing from a playlist but it's OK when a track is playing in the Music library.

Update 2: Here's a script that will reveal the current song in the Music playlist no matter where it is playing. Be sure to give it a shortcut.

tell application "iTunes"

activate

try

set dbid to (get database ID of current track)

set musicLib to some playlist whose special kind is Music

set theTrack to some track of musicLib whose database ID is dbid

reveal theTrack

end try

end tell

Obviously, this doesn't help get you back to the current playlist. But if you need to access the playing track for some other reason then it'll do. You can always right-click the LCD and access the current track's Get Info, Show in Playlist, and so on.

Update 3: Kirk has an important observation on this issue.

Update 4 (December 16): This appears to be fixed in iTunes 11.0.1.

December 2 2012 - 8:59 pm

Show Track Count and Time of Selected Playlist

There's seems to be a bit of inconsistency with the way iTunes 11 displays playlist time information as DD:HH:MM:SS. Sometimes times are displayed in the Status Bar at the bottom and sometimes a decimal version will be displayed beneath the playlist's name at the top of the browser. I can't quite get a grasp on something like "7.6 days" though.

Here's a script you can attach a shortcut to that will simply display a dialog box listing the name of the selected playlist, the number of tracks it contains, and the time of the playlist as DD:HH:MM:SS:

tell application "iTunes"

set thePlaylist to (get view of front browser window)

display dialog (get name of thePlaylist) & return & return & ¬

(get index of last track) & " tracks" & return & return & ¬

(get time of thePlaylist) buttons {"OK"} default button 1 giving up after 300

end tell

December 1 2012 - 11:36 am

UPDATED: Assimilate View Options v3.1

Assimilate View Options v3.1 re-creates a single selected playlist so its View Options (visible columns) are the same as the Music library (taking advantage of the fact that new playlists acquire the Music library's View Options).

This latest version worksaround iTunes 11's shuffle/song repeat difficulties which tripped an error when trying to re-apply those settings and prevented the script from completing properly.

November 30 2012 - 10:49 am

Interesting play Issue with MiniPlayer

As I mentioned below, I had to fix a script to workaround a problem playing a playlist when only one track had as yet been copied to it, which prevented the rest of the subsequently added tracks from being recognized by MiniPlayer and Up Next; thus, only the first track would play. Similarly, if you were to play (the AppleScript command) any track in a playlist, the following tracks will not play because they haven't been recognized by MiniPlayer and Up Next ("No upcoming songs").

Doesn't go good when Mini Player is empty:

tell application "iTunes"

set aTrack to item 1 of selection

play aTrack

end tell

You can play the playlist and everything's OK. You just can't initiate play of the entire playlist by playing one of its tracks with AppleScript.

Goes good and loads in MiniPlayer:

tell application "iTunes"

set aPlaylist to view of front window

play aPlaylist

end tell

Additionally, I found that if the MiniPlayer was already loaded up with tracks, playing a track (via AppleScript) from anywhere would play that track and then resume with whatever is next in MiniPlayer.

November 30 2012 - 10:26 am

iTunes 11 Loses playlist window

Technically, you can't open a playlist in its own window in iTunes 11, so the playlist window element is moot.

November 30 2012 - 9:54 am

UPDATED: Play Random Album v3.1

Play Random Album scans your library, creates a playlist of a complete single album choosen at random and begins playback of the playlist created. Works great when assigned a keyboard shortcut.

This version works around a problem with iTunes 11 whereby after starting to play the first track of the new playlist no additional tracks appear in the MiniPlayer/Up Next and only the first track ever plays. The script now waits until the playlist is completely assembled before starting to play it.

November 29 2012 - 9:40 pm

iTunes 11 Loses Gapless Track Feature

You can no longer designate an album of tracks as gapless. Thus, a track's gapless property is now moot.

ERRATA: My title for this post is misleading. The gapless feature has not been lost. But the ability to manually change a track's gapless setting has been removed.

November 29 2012 - 3:02 pm

iTunes 11 AppleScript bug

iTunes 11 breaks the AppleScript command to shuffle a playlist. The value of shuffle can still be read with get, it just can't be set.

Update: song repeat is broken in the same way.

Update 2: shuffle and song repeat will only return a value of false and off, respectively. Thus, in addition to being unable to change these values for a playlist, a script cannot detect the actual state of these settings.

November 29 2012 - 2:37 pm

iTunes 11 Released

Apple has released iTunes 11. Apple originally previewed iTunes 11 at its September Special Event, announced a vague October release date, and then later postponed release to November.

This updated version features some iOS-inspired GUI changes, re-designed MiniPlayer, improved iCloud integration, improved search, and a revamped design of the iTunes Store.

November 9 2012 - 8:27 am

NEW: Dual-Pass Search

Dual-Pass Search conducts a two-pass search for tracks in the currently selected playlist. On the first pass, the search query behaves like iTunes' own searchbox. Then the track results from the first pass are processed with a second search query.

The track results can be displayed in a Results Window and optionally sent to Results Playlist in iTunes.

Download it here.

Site contents © 2001 - 2024 (that's right: 2001) Doug Adams and weblished by Doug Adams. Contact support AT dougscripts DOT com. About.
All rights reserved. Privacy.
AppleScript, iTunes, iPod, iPad, and iPhone are registered trademarks of Apple Inc. This site has no direct affiliation with Apple, Inc.
The one who says "it cannot be done" should not be interrupting the one who is doing it.