Changing corrupted song without resetting play count
I've got a fair number of corrupted songs in my music library that I'd like to fix, either by using the ones in Apple Music or the original files via Match. However, I'd like to keep the original play count since I have a few smart playlists based on those. I've tried using AppleScript (including the "Add or Subtract Play Count" scripts in "Doug's Applescripts"), but that value gets reset with whatever is in the cloud the next time any other kind of metadata changes.
Is there any other way to change the play count, or swap the corrupted file with a non-corrupted file without changing the play count?