ciderapp / Apple-Music-Electron

Apple Music Electron is now deprecated. See our new project Cider https://github.com/ciderapp/Cider
https://cider.sh
MIT License
841 stars 63 forks source link

Fix #293 - Cannot read properties of null(reading 'setAttribute') #295

Closed lucasduartesobreira closed 3 years ago

lucasduartesobreira commented 3 years ago

About

When the aria-label from the Media Controls div get translated, the div become unreachable through the aria-label and throws errors like this one: image

This error caused the auto-play to stop working on the radio. To play every music, it's necessary a manual skip after each song. To get out of the radio, it needs to clean the song queue manually. It bugs the playlist too, where it needs to clean the song queue before changing the playlist.

Solves #293

Implements

This PR changed the way to get the Media Controls div from the aria-label to the className on the MusicKitInterop.