Jump to content

Emby Session and api key


Taurec

Recommended Posts

Taurec

Hello Luke,

did you change something in the format for the session query?
All browsers show me that the session can not be deserialized when xml is selected.

(URL: http://EmbyServer:8096/Sessions?api_key=xxx&format=xml.xml)

 

Message:

Type'MediaBrowser.Controller.Session.SessionInfo' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. Alternatively, you can ensure that the type is public and has a parameterless constructor - all public members of the type will then be serialized, and no attributes will be required.

When querying in format json, a created API key entry is now also displayed as a client.

In addition all created API Keys were deleted with an update (I can not understand with which update)

 

Is the format change wanted?
If so, will more changes follow?

If you make changes, it would be great if you included the ability to query a single session

Please give me the info because otherwise I can not continue with my Rainmeter Skin.

 

cu Taurec

Link to comment
Share on other sites

Taurec

really?

 

Luke, I've spent so much time on the skin. Can you at least answer my questions?

thanks in advance.

Taurec

Link to comment
Share on other sites

Taurec

Luke,

what I mean is this:
 

If you call the url h**p://EmbyIp:Port/emby/sessions?api_key=xxx&format=xml

then the message:

 

Type 'MediaBrowser.Controller.Session.SessionInfo' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute. Alternatively, you can ensure that the type is public and has a parameterless constructor - all public members of the type will then be serialized, and no attributes will be required.

 

is displayed
This has changed in the last versions. (from which I do not know).

In addition, the result has changed so that when querying the app name of the API key used is displayed as a user.

I use the xml query in Rainmeter and use regex to evaluate the number of sessions and further the individual sessions.
(that the single session is grouped with SessionInfoDto works fine)

For the query in the format json I would have to use lua script.
Rainmeter but does not allow external libs in lua and that makes the whole thing much harder)

For me, now the question arises, whether in the future tense the query in xml at emby deleted and the App Name is displayed as a user?

 

cu Taurec

Link to comment
Share on other sites

Ok i can fix that one specific issue to get it to serialize again. Just keep in mind that we're not actively testing xml output, so generally speaking we're not going to find out about this kind of issue until it's already been released. For this reason I would suggest using json. But I can fix this error.

 

 

 

For me, now the question arises, whether in the future tense the query in xml at emby deleted and the App Name is displayed as a user?

 

Is this still a question, or can you explain more? thanks.

Link to comment
Share on other sites

Taurec

Hello Luke,

thank you for your answer.

 

It will be fine when you can fix the error (serialize xml)

OK that means for me to change from xml to json. But this takes time.

 

Only one question left:

When i use a created API Key for the session query (format json) then the App Name from the Api Key is showed as Client (and a session for this is running)

This is new. Is this also a error ?

 

cu Taurec

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...