Jump to content

Media Player Classic Remote Control for Media Browser {EXPERIMENTAL}


anks

Recommended Posts

  • 3 weeks later...
daedalus

mpc remote show up as an active but not as a controlable device

i didn't used it a while so i can't say since which version it's broke

post-143-0-27277500-1451663678_thumb.png

 

log.txt

 

 

Link to comment
Share on other sites

I'm using 3.0.5782.0 and it still works, however, I've actually updated all the code last night to the latest API, and the trick (hack) I was using is now changed.  I am guessing this ties in with the upcoming server release.  Using the latest API and a none valid AccessToken, I get the same results as you.  If I add an AccessToken that represents a valid user session it works fine but the app is associated with that user.

 

Positively, the app now supports more content types, including live tv playback.  

 

What I'd like to see is a supported way of having this player connected to Emby without a user name, even if it requires an API Key, however the generate API Key functionality was removed a few releases back.  

 

Personally I don't see the issue in not having an AccessToken as long as a valid user token is passed when accessing content, I'm hoping @@Luke can comment on this. 

Link to comment
Share on other sites

@@Luke,any chance you can comment on the AccessToken?  Is there a way to get the HTML before you update the release, I checked on Github and couldn't see it.

Link to comment
Share on other sites

The attached version uses the API Key approach, to get a usable API Key, go to the server dashboard, right at the bottom of the page, there is an API link, within this link is an API key.  Enter this into field in the configuration dialog and let me know if this works.

 

One drawback with this approach, the API Key is tied to a user, despite not setting a user in the API.  This still allows the device to controlled by any user but all items are registered as being played by the API Key user.  Not sure if this will still be the case when using a device api key, I'll do some more research.

MPCRemote.zip

  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...

I've been having issues lately playing certain files. I don't know if this only started recently, or if it was always the case. After a bit of testing it seems like this issue comes up when the video file is not using CABAC. I get a "Failed to render media file" error in MPC or any other player. If I map my network drive or play from Kodi, the playback on all episodes works fine. It's only with MPC remote that I run into problems playing non-CABAC files from outside of my network. Any ideas?

 

EDIT: It seems to be working fine using the version with the API key. Is that the change that affected this playback issue? 

Edited by bfir3
Link to comment
Share on other sites

It's due to changes within Emby, a lot has changed in the API, the app hasn't been updated since 2014 and is therefore using a much older API.  Emby has come along way in a year, and the version using the Access Token is using a more recent API and also supports more stream types.   The original version was a hack to avoid authentication which I found looking through the API code, I'm trying to now use a supported method now but as you've seen the API Key page has been removed recently.

 

@@Luke any ETA to add the API page back to a stable release?  Once this happens I can release a new version, but if you can test in the meantime and let me know what does and doesn't work, that would be great.

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...
Happy2Play

Using the zip file in post 57, had to use "run as administrator" when launching the exe to get api key field to show.  But after using a generated api key with v1.0.2, it allowed v1.0.1 to work again.

Link to comment
Share on other sites

  • 3 weeks later...
Olywa123

Seems V1.0.0.1 is not working for me any longer either for the last couple of days with the latest Beta release.

 

V1.0.0.2 is working though after entering the api key.

Edited by Olywa123
  • Like 1
Link to comment
Share on other sites

Seems V1.0.0.1 is not working for me any longer either for the last couple of days with the latest Beta release.

 

V1.0.0.2 is working though after entering the api key.

 

Well done buddy!

Link to comment
Share on other sites

I've quite a lot of work updating the app, however before I can release a new version I cannot get it to associate with a user when playing back, hence when using the API key it will not record played items or resume for a specific user.

 

When the app is launched it authenticated with the API key and a blank user:

 

_apiClient.SetAuthenticationInfo(Properties.Settings.Default.AccessToken, string.Empty);

 

When playback starts, I set the authentication to the controlling user:

 

_apiClient.SetAuthenticationInfo(_apiClient.AccessToken, e.Argument.ControllingUserId);

 

after playback is stopped, the app resets user id to empty.

 

This used to work previously but no longer does, @@Luke any chance you can comment?  Looking through the code, API Keys can be assigned to users, or not, there is no way to add a user to an access token that doesn't already have one associated with it.

Edited by anks
Link to comment
Share on other sites

In order to associate to a user you're going to need to make them login and acquire the token that way, rather than the premade one from the server dashboard.

Link to comment
Share on other sites

@@Luke, thanks for taking the time to reply, however one of the initial requirements was to have this as a device that any user could control and play back was associated with their account.

 

This used to work fine, is there anyway it can be restored?

 

Imagine the scenario, you have MPC as a generic device, people use the Web Client to control it just like a DLNA device or a Chromecast.  Any play back is associated to their account, once they are finished the device is available to other users.

 

Also, does Chromecast associate played back content to a particular user or does it work the same way?  If not how is this achieved, anything I can do with the session id? 

 

I can confirm using an API Key associated with a user i.e. getting it from the Server Dashboard via the Swagger URL does associate playback with that user, but then all playback is associated with said user.

 

BTW, do many people still use this and is it worth the effort?  Is individual playback an issue?

Link to comment
Share on other sites

The problem is that there is a security risk associated with allowing the api to use one valid token to execute commands related to a different user than the token was originally created for. dlna and chromecast are both special cases because dlna runs in-process, and chromecast isn't really a full app, instead it's owned by the app that started the CC session. the good news is at least you can play, which was really the goal to begin with but the rest is just going to have to wait until i have time to look at it.

Link to comment
Share on other sites

@@Luke, an obvious choice would be on the API Key, allow the option to impersonate users?  Therefore it is then not a security risk, since the permission must be explicitly granted by an admin.  As you know originally I was exploiting some of the security issues with the Chromecast device but I wanted to bring this app in-line with the API.  As others have noted in this thread, that version doesn't work any longer with the recent dev builds.

 

I don't want to go down the route of hacking through the code again, but lets see if there is a need for this app any longer as many will be using some of the other great apps on more up to date devices.  I'm happy to do the work if so, otherwise lets leave things as they are.  

 

Out of interest, having an API key granted in the server dashboard allows what permissions.....you don't need to answer that!! :-)

Edited by anks
  • Like 1
Link to comment
Share on other sites

Olywa123

Deffo still in use here and find it invaluable for direct play of all video and audio types, would prefer of course to still have playback/progress/watched associated per user if it's possible.

 

I'd be happy to make a donation towards seeing it continue to be supported as was.

 

I think we will only see current users come here when the latest beta goes into live release.

Edited by Olywa123
  • Like 1
Link to comment
Share on other sites

@@Olywa123 if you're not a current supporter of Emby, definitely sign up, however for development of this app, I'm just very happy to be involved in the community and don't need any donation to continue my work and just want to know the right direction to go in, hopefully @@Luke can comment when he has time.

 

I should add, because of the changes in the API, MPC now supports many more media types.

Edited by anks
  • Like 2
Link to comment
Share on other sites

ubertoast

I have been using this app since it was originally released. I have my home theater setup with MPC Remote and use an android device (tablet or phone depending on what I have near me) to control / view the media library (using the Emby for Android app). Everything is played to the MPC Remote device.

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...