dougscripts.com

January 2024

May 24 2016 - 3:03 pm

Can't Replace "Convert ID3 Tags"

Apple has removed the "Convert ID3 Tags" command in iTunes 12.4. I don't know why. I didn't use it much myself but many users needed to convert the metadata ID3 Tag version so MP3 files imported or converted with iTunes would be compatible with other players.

There is no AppleScript command or property for iTunes that is related to this so no purely-AppleScript workaround is possible. Interestingly, SoundJam's AppleScript dictionary had a property to read—and possibly write, don't recall now—the default ID3 Tag version. It didn't make the trip to iTunes.

[UPDATE: the Convert ID3 Tags feature has been restored in iTunes 12.4.1.]

May 24 2016 - 9:17 am

UPDATED: Smarts v1.3.2

Smarts will save and store the criteria of an iTunes Smart Playlist—the smarts of a Smart Playlist—as a template so you can reload it into iTunes later.

This latest version makes accommodations for changes in iTunes 12.4.

Smarts is a free download from The Mac App Store.

May 23 2016 - 4:23 pm

Introducing The Next Track Podcast

Kirk McElhearn and I are pleased to announce the debut of The Next Track, a new podcast about how people listen to music today. Each episode will feature some news, some opinion, and a look at how music is consumed, whether it be analog or digital, downloaded or streamed, audio or video. We'll also look at some of the hardware used to listen to music: speakers, headphones, portable players, and home audio equipment. And there will be guests from time to time: musicians, producers, writers, critics, and more.

Each episode of The Next Track will be around 30 minutes, and episodes will be released weekly. We'll also publish articles of related interest on The Next Track.com.

Find out more, and subscribe to the podcast, at The Next Track website. You can follow The Next Track on Twitter at @NextTrackCast, to keep up to date with new episodes, and new articles from the website.

May 20 2016 - 4:55 pm

Did I Forget to Mention This?

The selection property will contain references to tracks selected in Apple Music. You can get properties of these URL tracks, but you can't set them. That would be dumb*.

I neglected to note this earlier because I was falling all over myself about current track and current playlist also being able to reference Apple Music items.

{UPDATE: *I stand corrected. You can set the loved property of the tracks in a selection of Apple Music tracks.]

May 20 2016 - 10:38 am

EQ window No No

The EQ window inherits full screen from window now, but setting full screen of EQ window to true will error.

Of course I tried it. Thought it'd be fun to see a full screen-sized EQ window.

Slightly disappointed.

May 20 2016 - 10:23 am

Tidbit on minimized

The browser window property minimized has been removed ("is the small player visible?"). This was related to the old behavior when minimizing the main window would switch to the miniplayer. Good times. I seem to recall this mechanism had different behaviors in various versions of iTunes. Anyway, not needed since the "small player" can be detected using the new miniplayer window class.

May 20 2016 - 7:12 am

Slight Growing Pains Continue

The podcast value for media kind will confuse older scripts that look for the podcast property of track. The podcast property for track ("is this track a podcast episode?") was removed in iTunes 12.4. Similarly, the iTunes U property of track has also been removed and is now a value for media kind.

May 18 2016 - 7:12 am

Reset Plays MIA

[UPDATE: iTunes 12.4.1, released June 2, 2016, restores the Reset Plays feature. The "Reset" button is located in the track's Get Info window's "Details" tab adjacent to the play count entry.

Of course, the script below is still serviceable.]

Looks like the "Reset Plays" command is MIA in iTunes 12.4. Here's a script that will reset the played count of each selected track to 0 and remove its played date.

tell application "iTunes"

set sel to selection

if sel is {} then return -- nothing selected

repeat with thisTrack in sel

-- use try blocks to fail gracefully if problem

try

set thisTrack's played count to 0

end try

try

set thisTrack's played date to missing value

end try

end repeat

end tell

Click on the script icon to open this in Script Editor on your machine. From Script Editor's File menu, click "Save...". In the Save Panel, enter a name for the script, like "Reset Plays", and save it to your [username]/Library/iTunes/Scripts/ folder (if no "Scripts" folder exists, create one). Once saved to this folder, the script will appear in iTunes' Script menu. To use, select the track(s) in iTunes whose plays you want to reset and then choose the "Reset Plays" script in the Script menu.

A more advanced version of this script is available as a download from this page.

Alternatively, you can use Add or Subtract Play Count, New Last Played Date, or New Play Count. Each has some capacity to change a track's Plays.

There still seems to be a bug regarding changing the Plays of Matched/Uploaded tracks in the cloud, whereby the played count reverts to whatever it was before being "artificially" set with AppleScript (or other means). I couldn't say if that issue is related to the disappearance of "Reset Plays".

May 17 2016 - 12:01 pm

Setting player position Can Fail

Setting the player position while the iTunes player state is paused resets the player state to stopped and resets the player position to 0.

tell application "iTunes"

play -- initialize the state to Play

pause -- put iTunes in Pause mode

set player position to 5

log (get player state) -- will be stopped

log (get player position) -- will be 0

end tell

Attempting a workaround, I found that as long as the track isn't paused, the player position can be set.

This did not occur in previous versions; setting the player position while paused would, as expected, move the play head to that position. In fact, Needle Drop uses a variation of this to begin playing a track at a user-set start time. Needless to say, this won't work with iTunes 12.4. (Hat-tip to Correspondent Rob Robinson.)

[UPDATE: Needle Drop v5.3 addresses this issue.]

[UPDATE ALSO: this issue is fixed in iTunes 12.4.1.]

May 17 2016 - 9:34 am

Music vs music

The AppleScript issue in iTunes 12.4 whereby filtering special kind by Music fails is caused by a conflict with the new media kind property. One of the values it uses is music.

Bugs are being filed. (Hat-tip to Correspondent Nate Weaver.)

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.