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 Subsonic #153

Merged
merged 5 commits into from May 16, 2017

Conversation

Projects
None yet
4 participants
@ALiangLiang
Contributor

ALiangLiang commented Nov 7, 2015

Adding support for Subsonic. http://www.subsonic.org/pages/index.jsp
It's a media streamer uses JWPlayer.
Probably this is not the best way to do this, but it was the only way that I could get working.

@ALiangLiang ALiangLiang changed the title from Added support to Subsonic to Add support to Subsonic Nov 7, 2015

@ALiangLiang ALiangLiang changed the title from Add support to Subsonic to Add support for Subsonic Nov 7, 2015

@philosowaffle

This comment has been minimized.

Show comment
Hide comment
@philosowaffle

philosowaffle Jan 26, 2016

@ALiangLiang

+1

I suggest one modification to ensure this also works for Madsonic (fork of Subsonic). The Madsonic webplayer will have the same url matchers as the Subsonic webplayer.

function onKeyPress(key) {
  if (this.jwplayer) {
    if (key === NEXT) {

      // Subsonic impl
      var nextButton = document.querySelector('img[onclick="onNext(false)"]');

      // Madsonic impl
      if(!nextButton){
        nextButton = document.querySelector('a[onclick="onNext(false)"]');
      }

      simulateClick(nextButton);

    } else if (key === PLAY) {
      location.href = "javascript:window.jwplayer().play()";
    } else if (key === PREV) {

      // Subsonic impl
      var backButton = document.querySelector('img[onclick="onPrevious()"]');

       // Madsonic impl
      if(!backButton){
        backButton = document.querySelector('a[onclick="onPrevious()"]');
      }

      simulateClick(backButton);
    }
  }
}

philosowaffle commented Jan 26, 2016

@ALiangLiang

+1

I suggest one modification to ensure this also works for Madsonic (fork of Subsonic). The Madsonic webplayer will have the same url matchers as the Subsonic webplayer.

function onKeyPress(key) {
  if (this.jwplayer) {
    if (key === NEXT) {

      // Subsonic impl
      var nextButton = document.querySelector('img[onclick="onNext(false)"]');

      // Madsonic impl
      if(!nextButton){
        nextButton = document.querySelector('a[onclick="onNext(false)"]');
      }

      simulateClick(nextButton);

    } else if (key === PLAY) {
      location.href = "javascript:window.jwplayer().play()";
    } else if (key === PREV) {

      // Subsonic impl
      var backButton = document.querySelector('img[onclick="onPrevious()"]');

       // Madsonic impl
      if(!backButton){
        backButton = document.querySelector('a[onclick="onPrevious()"]');
      }

      simulateClick(backButton);
    }
  }
}
@ALiangLiang

This comment has been minimized.

Show comment
Hide comment
@ALiangLiang

ALiangLiang Feb 23, 2016

Contributor

@philosowaffle

Good idea! But I suggest you PR a independent Madsonic version. It's some differense between Subsonic and Madsonic. I think it's will more convenient to maintain.

Contributor

ALiangLiang commented Feb 23, 2016

@philosowaffle

Good idea! But I suggest you PR a independent Madsonic version. It's some differense between Subsonic and Madsonic. I think it's will more convenient to maintain.

@philosowaffle

This comment has been minimized.

Show comment
Hide comment
@philosowaffle

philosowaffle Feb 23, 2016

Madsonic uses the exact same matchers as Subsonic in the manifest.json file so I cannot create a separate Madsonic entry as it would conflict with Subsonic. Also, I doubt any of these pull requests will get merged by the repo owner anyway. I just created a fork that includes some of the less popular music players so people can have the option of installing this plugin in developer mode if they so choose.

philosowaffle commented Feb 23, 2016

Madsonic uses the exact same matchers as Subsonic in the manifest.json file so I cannot create a separate Madsonic entry as it would conflict with Subsonic. Also, I doubt any of these pull requests will get merged by the repo owner anyway. I just created a fork that includes some of the less popular music players so people can have the option of installing this plugin in developer mode if they so choose.

@feedbee feedbee added the new-service label May 10, 2017

@vinyldarkscratch

This comment has been minimized.

Show comment
Hide comment
@vinyldarkscratch

vinyldarkscratch May 11, 2017

Contributor

Hello, thanks for your contribution! Sorry for such a long wait, this project is now maintained by another, and we're now working on closing all issues and PRs as much as possible. ;) I tested this out and have had no issues with it, would you be willing to fix the conflicts with the manifest file before we accept your PR?

Contributor

vinyldarkscratch commented May 11, 2017

Hello, thanks for your contribution! Sorry for such a long wait, this project is now maintained by another, and we're now working on closing all issues and PRs as much as possible. ;) I tested this out and have had no issues with it, would you be willing to fix the conflicts with the manifest file before we accept your PR?

@feedbee feedbee merged commit e360f46 into borismus:master May 16, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment