dougscripts.com

Big Sur

January 2 2021 - 1:26 pm

UPDATED: Multi-Item Edit v7.0

For macOS 10.15 and later only. This applet will allow you to view and edit most tags (and some additional options) of the selected track(s) in a single floating window using single-edit mode (one selected track) or multi-edit mode, which emulates the pre-iTunes 12 "multiple items" format; that is, a checkbox adjacent to each tag allows you to select which changes are to be applied to the selection's tags.

Can also be used to copy collected tags from one set of tracks to another set of tracks by toggling "Information Tracking".

Latest version:

  • Additional UI updates and accommodations for macOS 11

More information for Multi-Item Edit v7.0 and download link is here.

December 17 2020 - 3:48 pm

UPDATED: Search Discogs v1.1

For macOS 10.15 and later only. This script will use the Song Title, Artist, Album Artist or Album name of the selected or playing track as the basis for a search of the Discogs website.

Note: A current bug (or feature) in the Music app (v1.1) prevents AppleScript from getting tag information from a streaming Apple Music track.

Latest version:

  • Accounts for Music app bug/error getting tag info from streaming tracks

More information for Search Discogs v1.1 and download link is here.

December 17 2020 - 3:11 pm

UPDATED: Search Wikipedia v3.1

For macOS 10.15 and later only. Performs a "Go" search of Wikipedia (like Google's "I'm Feeling Lucky") in your default browser using the Song Title, Album, Artist, or Composer tag of the single selected or currently playing Music track. OR if a radio stream is currently playing and the provider has formatted the stream title correctly, such that Artist - Song Title is displayed, the script will do a Wikipedia search for the Artist name.

Note: A current bug (or feature) in the Music app (v1.1) prevents AppleScript from getting tag information from a streaming Apple Music track.

Latest version:

  • Accounts for Music app bug/error getting tag info from streaming tracks

More information for Search Wikipedia v3.1 and download link is here.

December 16 2020 - 5:00 pm

Getting properties of Streaming Tracks

When a track is playing in the Music app, Music's AppleScript properties current track and current playlist will be references to that track and the playlist it is playing from. If you have written a script or an app that, for example, displays a notification with the title, artist, album and duration of the currently playing track, current track is who to ask.

Now in Big Sur and Music v1.1, the current track and current playlist will be an "unknown object type" if the track is streaming from Apple Music; this is not a problem if a current track is a local track.

I've already heard from a couple of devs who've run into this issue with their apps and I'm afraid there's no workaround that I'm aware of. The best you can do is account for the error that the call to current track will generate if a non-local track is playing.

I never know if these sorts of things are intentional or not. You certainly shouldn't be able to edit the tags of a streaming track. But I'm not sure why grabbing displayable info—that, to a degree, is otherwise available via "Get Info"—should be hands-off.

December 5 2020 - 12:41 pm

UPDATED: Put Track Prefix to Track Number v3.0

For each selected track whose Song Name starts with a number (0-999) the script will copy the number to the track's track number tag. Use carefully; be sure the number is not part of the actual Song title, eg: "12th Street Rag", "5:15", "99 Red Balloons", etc.

Latest version:

  • Accommodations for macOS 11 Big Sur
  • Performance, UI and security enhancements

More information for Put Track Prefix to Track Number v3.0 and download link is here.

November 29 2020 - 2:04 pm

NEW: Work and Movement Scripts v2.0

For OS X 10.15 or later only. These are three simple scripts that will assist with editing Work and Movement tags using the current tag data in track Title and Grouping tags:

  • Song Title to Work - select the text from the track Title to apply to the Work tag of the selected tracks
  • Song Title to Movement - select the text from the track Title to apply to the Movement tag of the selected track
  • Copy Grouping to Work - copy the text of the Grouping tag to the Work tag of selected tracks

These were originally posted as script listings (and further described here and here), but some users may prefer to download the compiled scripts.

Latest version:

  • Accommodations for macOS 10.15 and later
  • Performance, UI and security enhancements

More information for Work and Movement Scripts v2.0 and download link is here.

November 28 2020 - 9:22 pm

NEW: View-Edit Playlist Description v1.0

A playlist's description tag is only visible/user-editable when the playlist is viewed "as Playlist". This script will allow you to view and edit the description of a playlist no matter what View is selected. (Unfortunately, a bug prevents AppleScript from changing this tag for Playlist Folders.)

Latest version:

  • Initial release

More information for View-Edit Playlist Description v1.0 and download link is here.

November 28 2020 - 7:56 pm

Toggle Views Via Keyboard Shortcut

I'm re-posting/reconstituting this tip with a more obvious title because I can never find it to forward to a Correspondent whenever I'm searching for it on my own website!

* * *

Correspondent David K. turned me on to this trick, which I had never seen before:

As you may know, you can assign Keyboard Shortcuts to application menu commands in System Preferences > Keyboard > Shortcuts. Conventionally, you would select the name of the app, the name of the menu command, and a keyboard shortcut combination in this preference tab. What I didn't know is that you can designate the precise menu heirarchy for a command by entering something like Top Menu->Submenu->Command, with "->" between each menu title, instead of just the name of the command.

The reason I want to do this in iTunes is that I'd like to set a shortcut for the "Songs" playlist view. But, because the word "Songs" is also in the Controls > Shuffle submenu, simply entering "Songs" in the keyboard shortcut panel would invariably toggle the Shuffle Songs option.

But by entering View->View As->Songs, the keyboard shortcut knows I mean that "Songs" and not the Controls > Shuffle > Songs.

Hoy!

Then I did the same for Playlist view:

The shortcuts also appear adjacent to the commands in their menu.

And an AppleScript could probably fire the shortcut via System Events.

UPDATE for The Music app: These instructions are pretty much the same except you will note that the names of the menu items in the View menu are "as Songs" and "as Playlist". Thus, use View->as Songs, View->as Playlist .

November 28 2020 - 5:53 pm

UPDATED: Play Random Album v4.1

For macOS 10.15 and later only. This script scans your library, creates a playlist of a complete single album chosen at random and begins playback of the playlist created. Works great when assigned a keyboard shortcut

Latest version:

  • Accommodations for macOS 11 Big Sur
  • Performance, UI and security enhancements

More information for Play Random Album v4.1 and download link is here.

November 25 2020 - 8:28 pm

UPDATED: Artist to Last-First v5.3

For macOS 10.15 and later only. This applet will parse the text of the chosen tag (Artist, Album Artist, Composer or one of their Sort siblings) of a selection of tracks:

Move the LAST word of the tag to the beginning, eg:

  • Hound Dog Taylor -> Taylor, Hound Dog
  • OR Move the FIRST word of the tag to the end, eg:

  • The Crystal Method -> Crystal Method, The
  • Then, the newly configured text can be copied back to your choice of Artist, Album Artist, Composer, Sort Artist, Sort Album Artist and/or Sort Composer tag(s).

    Latest version:

    • Restores support for CD tracks
    • v5.2 (oct 31, 2020):
    • Additional accommodations for macOS 11 Big Sur

    More information for Artist to Last-First v5.3 and download link is here.

    Site contents © 2001 - 2021 (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 interrupt the one doing it.