Jump to content


Photo

3.6 api breaking changes


  • Please log in to reply
115 replies to this topic

#1 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 121612 posts
  • Local time: 11:32 PM

Posted 30 August 2018 - 12:28 PM

Item Ids - these will now be plain integers instead of guids, but as long as you treat Ids as plain strings it shouldn't matter.
 
User views - there is no more user view grouping, so you can remove any workarounds you might have related to this
 
VideoType/IsoType properties - deprecated. Container property will now include:
dvd
bluray
dvdiso
blurayiso
iso (this means iso of unknown type)
 
IsPlaceHolder property- deprecated. Container property will now include:
disc

SpecialFeatureCount property- now off by default, must be explicitly requested. For detail screen display, apps should not rely on this value and instead just make the api call to get the extras, making sure to handle empty result sets.

 

People item counts - for example, MovieCount, SeriesCount - apps should not use these anymore and instead just make the call to fetch the items, making sure to handle empty result sets.

 

IsHD property- deprecated, use Width and/or Height fields.

 

CollapseBoxSetItems - deprecated in favor of a new property GroupItemsIntoCollections. This should be added directly to the UI for Movies screens. To support older versions of the server, leave your CollapseBoxSetParams as they are for a little while.


  • Angelblue05 likes this

#2 Angelblue05 OFFLINE  

Angelblue05

    Advanced Member

  • Developers
  • 12940 posts
  • Local time: 10:32 PM

Posted 01 September 2018 - 07:09 PM

@Luke

 

The Container property is it contained within the item at the same level  as videotype was? or is it within MediaSources

Edit: Or rather, is there a difference between the two?

 

Also, did the behavior of blocked items changed for inherited items, i.e. block tag applied to tv show, but must also be applied at season/episode level?


Edited by Angelblue05, 01 September 2018 - 07:15 PM.


#3 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 121612 posts
  • Local time: 11:32 PM

Posted 01 September 2018 - 08:21 PM

Container should be the same for both. You'd use the item property at display time, and the media source property during playback.

Block items should not have changed.
  • Angelblue05 likes this

#4 Angelblue05 OFFLINE  

Angelblue05

    Advanced Member

  • Developers
  • 12940 posts
  • Local time: 10:32 PM

Posted 02 September 2018 - 12:20 AM

@Luke

 

Thank you for your reply. How about requesting the field ItemCounts, is that still valid? I can't get it to work with 3.6. Only ChildCount works.


Edited by Angelblue05, 02 September 2018 - 12:20 AM.


#5 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 121612 posts
  • Local time: 11:32 PM

Posted 02 September 2018 - 12:26 AM

What counts do you need?



#6 Angelblue05 OFFLINE  

Angelblue05

    Advanced Member

  • Developers
  • 12940 posts
  • Local time: 10:32 PM

Posted 02 September 2018 - 12:31 AM

The recursive count (to know if a show is empty/has no episodes).


Edited by Angelblue05, 02 September 2018 - 12:31 AM.


#7 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 121612 posts
  • Local time: 11:32 PM

Posted 02 September 2018 - 12:36 AM

Make sure to request the RecursiveItemCount field.


  • Angelblue05 likes this

#8 null_pointer OFFLINE  

null_pointer

    Advanced Member

  • Developers
  • 5371 posts
  • Local time: 02:32 PM

Posted 03 September 2018 - 06:12 PM

I am just playing with the new SDK (3.6.0.34-beta), I though Items were going to have an int id now, the BaseItem I am looking at still uses GUID's

 

public Guid Id { get; set; }

 

Am I looking at the wrong version?


Edited by null_pointer, 03 September 2018 - 06:12 PM.


#9 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 121612 posts
  • Local time: 11:32 PM

Posted 03 September 2018 - 08:24 PM

There's a new InternalId property. We're not yet at the point where we can just drop the guids, so right now they are both side by side. But you'll notice that pretty much all internal server api's are expecting the numeric id's now.



#10 null_pointer OFFLINE  

null_pointer

    Advanced Member

  • Developers
  • 5371 posts
  • Local time: 02:32 PM

Posted 03 September 2018 - 08:31 PM

So is it the plan to drop the GUIDs before 3.6 is released or will this take a few releases to get there?



#11 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 121612 posts
  • Local time: 11:32 PM

Posted 03 September 2018 - 08:34 PM

No the guids will remain on the server for quite some time, however, the Ids that come out of the web api will be the numeric id's.



#12 null_pointer OFFLINE  

null_pointer

    Advanced Member

  • Developers
  • 5371 posts
  • Local time: 02:32 PM

Posted 03 September 2018 - 09:40 PM

ok cool so for now I can still use the GUIDs internally for server plugins to track items.



#13 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 121612 posts
  • Local time: 11:32 PM

Posted 03 September 2018 - 10:02 PM

Yes.



#14 null_pointer OFFLINE  

null_pointer

    Advanced Member

  • Developers
  • 5371 posts
  • Local time: 02:32 PM

Posted 04 September 2018 - 10:01 PM

@Luke

 

One of the changes I see that has effected my plugin is the following:

 

var session = _sessionManager.GetSession(e.DeviceId, e.ClientName, "");

 

...

 

session.NowPlayingItem.Id <- Id is now a string

and

session.UserId <- is now a long

 

I was using these to compare to the event data to make sure the event and the current session line up.

 

It looks like the sessions user and items entries only have the NEW integer ID values while the event has the old GUID user ID and item ID

 

From my plugin log:

EventMonitorEntryPoint: StartPlaybackTimer : event_playing_id   = bcfa53e37993bf75cc29d281bab9b86d
EventMonitorEntryPoint: StartPlaybackTimer : event_user_id      = d27bb7bbb42b43c9a78dda173fe3a589
EventMonitorEntryPoint: StartPlaybackTimer : session_playing_id = 14
EventMonitorEntryPoint: StartPlaybackTimer : session_user_id    = 1


#15 null_pointer OFFLINE  

null_pointer

    Advanced Member

  • Developers
  • 5371 posts
  • Local time: 02:32 PM

Posted 04 September 2018 - 10:20 PM

I found

 

Item.InternalId

and

Users.InternalId

 

Is internalId intended to be used for the new Integer ID values for items?

 

I can use this to check against the session items and they look like they line up correctly.

 

i.e.

StartPlaybackTimer(PlaybackProgressEventArgs e)
{
   var session = _sessionManager.GetSession(e.DeviceId, e.ClientName, "");

   // the following are equal for the same user and same item
   if (e.Item.InternalId.ToString() == session.NowPlayingItem.Id) {} == TRUE

   if (e.Users[0].InternalId == session.UserId) {} == TRUE

}

Does this look ok to use? Will these fields be going away?


Edited by null_pointer, 04 September 2018 - 10:25 PM.


#16 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 121612 posts
  • Local time: 11:32 PM

Posted 05 September 2018 - 12:15 AM

No, you will need to compare like this:

e.Item.InternalId == _libraryManager.GetInternalId(session.NowPlayingItem.Id)

Unfortunately Emby for WMC is assuming all id's are guids, and we can't easily change that right now, so that is why you see in many internal areas the Id's are strings. This means the property could hold either the guid or numeric id. I am doing my best to minimize these but unfortunately i can't do them all without breaking Emby for WMC. @ebr

 

Eventually I will make them all numeric, but we can't do that as long as we are still supporting emc.



#17 null_pointer OFFLINE  

null_pointer

    Advanced Member

  • Developers
  • 5371 posts
  • Local time: 02:32 PM

Posted 05 September 2018 - 12:27 AM

oh.

 

Can I do the same for user IDs



#18 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 121612 posts
  • Local time: 11:32 PM

Posted 05 September 2018 - 12:28 AM

Yes.



#19 null_pointer OFFLINE  

null_pointer

    Advanced Member

  • Developers
  • 5371 posts
  • Local time: 02:32 PM

Posted 05 September 2018 - 01:18 AM

in the case of session.UserId is that already an InternalId?



#20 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 121612 posts
  • Local time: 11:32 PM

Posted 05 September 2018 - 01:22 AM

If it's a long, yes.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users