Get Current Album

Authored on
Sun, 11/24/2024 - 09:22
Body

It's weird how janky Shortcuts is at getting what you are currently listening to. I've never gotten the actual Music shortcuts to work on desktop. There is an option for getting what is currently playing with a Shazam shortcut but that doesn't give you the album name.

Shortcuts does run Applescript though. I did a little searching and found the script for getting what you are listening to. Very cool how quickly it grabs the result.

tell application "Music"
    if player state is playing then
        set currentTrack to current track
        set albumName to album of currentTrack
        set artistName to artist of currentTrack
        set albumYear to year of currentTrack
        set albumGenre to genre of currentTrack
        return "Currently listening to: \"" & albumName & "\" by " & artistName & " (" & albumYear & ", " & albumGenre & ")"
    else
        return "Music is not currently playing."
    end if
end tell

Getting this working is inspiring me to use Applescript more with Shortcuts in the future.

Today's Albums

Title Artist Release Date Genre
Love Changes Everything Dirty Three Indie
The Toshiko Trio Toshiko Akiyoshi Jazz