Shazam a playlist

This is actually a combined iOS and Mac automation that I’m looking for some help with.

My goal is to convert a weekly 4hr+ music podcast from a single .m4a file with no tracklist to an Apple Music playlist. That way I can know who I’m listening to and skip around to tracks I like and all of that good stuff.

So far I’ve been doing grabbing the file from youtube-dl (works with mixcloud!) and playing it in Music on my Mac and using my ‘Playlist Eater’ shortcut built around the ‘Shazam It’ action. The shortcut also triggers a Keyboard Maestro URL for the following Apple Script:

tell application "Music" to set player position to (player position + 90)

I figure 90 seconds is a good trade off between speeding up the whole process and making sure I don’t skip over any songs entirely.

My main problem at the moment is whenever Shazam can’t find a song the music keeps playing but the shortcut breaks - meaning I need to monitor the process throughout to restart the scan whenever it stops.

Can anyone think of a better way of doing this? I’ve noticed that the author of the podcast does sometimes follow up with a plain text track list in the website comments, is there a way I can input that directly to Apple Music without searching each individual song?