I fixed a bug in my workflows to rate music. I use duration to locate the library version of a song playing on Apple Music. This didn’t work for pre-Apple Music library songs that can have a slightly different duration as the version playing.

https://github.com/JackWellborn/AppleScripts