Batch modify metadata for local music files in the macOS Apple Music app using regex
0
votes
1
answer
200
views
I would like to batch modify metadata for local music files (mainly AAC in m4a, with some mp3) in my local music library from the macOS Apple Music app using regex.
Specifically, I'd like to retitle tracks using matching groups from a regex on the existing title.
Can this be done via any Apple scripting facilities, like the Shortcuts app, the Automator app, or any other Apple-provided scripting?
In Shortcuts, I tried to pass the output from a "Find Music" action to a "Run JavaScript for Mac Automation" action, but I keep getting errors (like
The operation couldn’t be completed. (WFMacHelperErrorDomain error 1.)
even when I don't modify the run
function at all) no matter what I do.
If not, do any third-party scripting facilities work with the Apple Music API such that the files get modified through Apple Music, instead of directly modifying the files, then having Apple Music scan the file system for changes?
If nothing works with the Apple Music API, what third-party tools/libraries offer batch regex music metadata parsing & modification? For third-party scripting, I'd prefer JavaScript/zsh/Java/Kotlin/etc.
Asked by XDR
(664 rep)
Sep 4, 2024, 09:44 AM
Last activity: Jun 29, 2025, 06:04 PM
Last activity: Jun 29, 2025, 06:04 PM