Skip to content
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

Added radiojavan connector. #2032

Merged
merged 5 commits into from
Oct 24, 2019
Merged

Conversation

Slayer0248
Copy link
Contributor

Added radiojavan connector.

Copy link
Member

@inverse inverse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome first attempt. Unsure about the playButtonSelector though.

Also var should be replaces with let See the travis build status for info.

src/connectors/radiojavan.js Outdated Show resolved Hide resolved
@alexesprit alexesprit added connector This issue or pull request is related to connectors implemented This pull request proposes a new connector implemented labels Aug 5, 2019

Connector.trackSelector = '.mainPanel .song';

Connector.playButtonSelector = '.playIcon';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be dropped as you've wired up the Connector.isPlaying function. Alternatively and perhaps better is what @alexesprit suggested and to drop Connector.isPlaying and wire up the stopButtonSelector` After that It's all good

@inverse
Copy link
Member

inverse commented Oct 22, 2019

@Slayer0248 any update?

@alexesprit
Copy link
Member

The connector does not work properly because of bugged website. It's partially reloaded on every track change (including body element), and the mutation observer no longer works.

The solution is to use custom mutation observer to watch the whole document:

new MutationObserver(Connector.onStateChanged).observe(document, {
	childList: true, subtree: true,
	attributes: true, characterData: true,
});

@alexesprit alexesprit merged commit 1279b4d into web-scrobbler:master Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
connector This issue or pull request is related to connectors implemented This pull request proposes a new connector implemented
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants