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
Fix play button case of default isPlaying. #3691
Conversation
The V3 changes greatly simplified isPlaying, which changed the semantics slightly. This change flips the buggy first boolean case: When the play button is visible, music is *not* playing.
@web-scrobbler/web-scrobbler-team: How important is it to restore the old semantics? Namely: The old method short-circuited only if the play button selector was defined and visible; This method short-circuits if the selector is defined and invisible, never checking the pause case in that case. |
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.
Whoops, this one slipped through! Good find.
Had a look into the method pre/after v3, looks like it was a simplification that happened because of the misread of the original function, I doubt the difference is meaningful with this bug fixed, but to be safe I think it's a good idea to restore the old functionality fully. |
I'm headed off to bed rn so won't be able to work on this until the morning, but if you want to go ahead and jump into it we already have an unexported visiblefilter function in content util that is based on the jquery is(":visible"). I think we can probably just export that, probably under a different name, and use it. |
Great catch! Do we have any connectors that handle both selectors? |
TIDAL does (though it seems to function with just the one); That's why I dug into the change beyond the obvious breakage. |
As far as I can tell v2 also short-circuited, but it short circuited to false if selector defined but element not exists. v3 short circuits to true instead. |
@yayuyokitano is correct - here is the v2 code. If playbutton selector is set and it didnt match it''ll return false. Sounds like the TIDAL
FYI - a good place for exploring v2 is using https://github.dev/web-scrobbler/web-scrobbler/tree/588cb49ca49934a455664254f61741bb791f366c |
The V3 changes greatly simplified isPlaying, which changed the semantics slightly. This change flips the buggy first boolean case: When the play button is visible, music is not playing.