-
-
Notifications
You must be signed in to change notification settings - Fork 540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for nicecream.fm connector #4513
base: master
Are you sure you want to change the base?
Conversation
src/connectors/nicecream.fm.ts
Outdated
Connector.playButtonSelector = '.controls-wrapper .play-small.on'; | ||
Connector.pauseButtonSelector = '.controls-wrapper .play-small.off'; | ||
|
||
Connector.isPlaying = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be removed and we could just use
Connector.playButtonSelector = '.controls-wrapper .play-small.off';
We don't need to define isPlaying
and pauseButtonSelector
as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done 55e1817
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside the comments LGTM
b76a77b
to
6e0e0e2
Compare
6e0e0e2
to
55e1817
Compare
Hold on, there is an issue I'm seeing on Firefox and Chrome (Windows 10). If I'm on nicecream.fm while scrobbling (green playing icon), switch to another tab, then come back to nicecream.fm, it goes from the playing icon to the red base icon. It does seem like the song is still scrobbling and the red base icon disappears if I change channels. Did a quick check on Youtube and Spotify and neither of them have this issue. Edit: so, edit2: Adding back the piece of code in first edit doesn't matter. It seems like the icon in Chrome is persisted regardless without |
Still works fine on Chrome. On Firefox, it seems like the icon doesn't change if I'm on nicecream.fm for a while without the music playing. After I play the music and switch around tabs, the now playing icon doesn't budge. If I close nicecream.fm, reopen it, play music, and switch tabs, the now playing icon is gone and instead the base icon shows. |
Interesting - @yayuyokitano perhaps you have some insights here? For me it's working with the suggestion on Chrome. |
Not sure what's going on there, try enabling debug logs in advanced settings and seeing whats going on in the console. Could the issue be related to extension being hot reloaded somehow? Does the issue still occur if you have one firm build, reload extension, and refresh the page? |
|
Noted some weird inconsistencies with Chrome where the icon does change to the Base, but it seemed to clear away after clearing history, restarting Chrome, removing the extension, making and adding a new build. Didn't add logs because they looked pretty similar to the ones I posted above. Cause for alarm? |
I haven't noticed anything odd when testing things :/
when enabling debug mode I enabled these logs when pausing/resuming - multiple |
This indicates that the error is probably not in the connector/tab controller. The controller is having the correct mode, but for some reason the service worker is using the wrong tab for setting the icon. Does this happen with other connectors too? Maybe it's related to iframe stuff somehow. |
With 9128, switching between tabs didn't result in any mode change logs in the console.
Yeah, it does seem like it, though the problem is much more pronounced on Firefox for some reason. |
Would using the developer version of Firefox make a difference? |
Addresses #4398.
Describe the changes you made
Added connector file for nicecream.fm. Had a bit of a head scratcher on first attempt at why the scrobbler wasn't detecting songs, but it was because of the iframes (had to add another url for nicefm).
Additional context
N/A