SynQApp / Extension

Your music companion for the web, with a portable mini player and the ability to listen to any music link on your preferred service!
https://www.synqapp.io
Apache License 2.0
24 stars 2 forks source link

Implement notifications on song change feature #31

Closed tekkeon closed 10 months ago

tekkeon commented 10 months ago

Overview

Implemented the notifications on song change. Notifications will not be displayed in any of these three conditions:

For non-Mac users, we can display the album art by using a base64 encoded image, hence the helper. If fetching and encoding the image fails or if the user is on Mac, we use text notification.

I also renamed the private methods of each observer to be more accurate and consolidated some constructor and the notifications logic to the observer "abstract" class.

tekkeon commented 10 months ago

Reorganized Observers so they can be subscribed to in addition to through the messages it was already emitting. This allowed the notification creation logic to be decoupled from the Observer class.