BPM info from djay to Apple Music/iTunes?

There was an Applescript that wrote BPMs from Djay Pro over to Music (formerly iTunes). See here:

It was great to populate the BPM field in Music and also to create smart, BPM-based playlists.

It worked well up until the latest 5.0.1 version of Djay but it doesn’t work anymore. I took a look at the script and it is well beyond my scripting capabilities. Could anyone else try to get it working on Version 5.0?