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

Add MediaBrowser as a supported Server Selection #282

Closed
kingargyle opened this issue Oct 10, 2014 · 5 comments
Closed

Add MediaBrowser as a supported Server Selection #282

kingargyle opened this issue Oct 10, 2014 · 5 comments

Comments

@kingargyle
Copy link
Contributor

In the Discovered Servers, Media Browser should be an option. This means implementing server discovery for the Media Browser just as we do with Plex, and also implementing a Communication layer to build up the necessary VideoContentInfo objects. This does depend on Dagger being implemented in the application at least at the communication level with the server.

Information on the communication layer for MediaBrowser is here.

https://github.com/MediaBrowser/MediaBrowser.ApiClient.Java

@kingargyle kingargyle added this to the 2.0.0 milestone Oct 10, 2014
@kingargyle
Copy link
Contributor Author

This issue depends on #281

@kingargyle kingargyle modified the milestones: 2.0.0 - MediaBrowser Support, 1.9.0 Nov 16, 2014
@kingargyle
Copy link
Contributor Author

Issue #281 has been completed. The app now uses Dagger for dependency injection. Working on fixing some injection points up. Will need to install the latest MediaBrowser and the Java client for it.

@kingargyle
Copy link
Contributor Author

Official client code for this support is available at the following project.

https://github.com/MediaBrowser/Emby.ApiClient.Java

Unfortunately this isn't deployed to JCenter so will need to fork this and create a version that I can import into the project. I'd rather not include the binaries in a lib directory but may have to do it just to get things going.

@kingargyle
Copy link
Contributor Author

kingargyle commented Oct 3, 2017

started work on this, and it looks like I will need to implement a similar Server discovery that we use for Plex. The problem with the IServerLocator and ServerLocator implementations from the Emby Media browser Java code, is that it doesn't emit the items as it finds them. Instead it loops through a time out period, and after the time out period it sends out the notification of all the servers that were discovered.

Serenity needs a slight modification to this code so that there is an Implementation that during the time out period, it will emit each of the servers it finds instead of adding them to an array list. It should post an event for the serves, and then Serenity will listen for the event and add the discovered server to the list of available servers.

https://github.com/MediaBrowser/Emby.ApiClient.Java/blob/db6e8cadb42f39ba389820a9ca9e42019ec64623/android/src/main/java/mediabrowser/apiinteraction/discovery/ServerLocator.java

The above code can be used as a basis, and if we implement a different Callback interface we can generalize it.

  1. Needs to call onResponse for each item it receives.
  2. Needs to be able to be used outside of serenity.

@kingargyle
Copy link
Contributor Author

This is now implemented. A new Server Selection screen will present available servers. This is shown once, and will take the user either the the Main screen or a User Login screen. I've ended up discarding the emby's official API and writing one myself. It was just easier to deal with and we don't need everything that Emby provides.

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

No branches or pull requests

1 participant