Jump to content

Difference between APPS "Latest Media"


Recommended Posts

pir8radio
Posted

So the web interface shows the correct order of latest media.. But for some reason any other app, emby theater, and Roku shows some other form of latest media...  Different from the web gui.  Any ideas why?  Anything to look at before I go into more detail?

Posted

The roku and others that show differently are using the generic item query:

/items?includeitemtypes=movie&sortby=dateadded&sortorder=descending

 

There is a new endpoint /items/latest?includeitemtypes=movie (presorted) which is slowly making the rounds.

 

I thought these returned the same results...

 

Sent from my Nexus 7 using Tapatalk

pir8radio
Posted (edited)

Yea they are different for me....     I use timelord to auto change the date added to match the release date...   Everything looks correct on web GUI but not on roku...   Its showing all older movies.  Same with emby theater....  they match...   SOOooo FYI in case something is wrong, using 3.1.17.0

Edited by pir8radio
pir8radio
Posted (edited)

So the latest beta Version 3.1.19.0 Still has this behavior, My Roku users are complaining they dont see any of the latest movies anymore, and have to go looking for them..   Any fix that "I" can do?      Behavior being, Roku shows wrong "recent media" as compared to web GUI.

Edited by pir8radio
Posted (edited)

@@pir8radio

 

I spent some time adding both endpoints. I can now choose my latest row to use /items and sortby,sortorder or I can use /items/latest . Now for the good, this works. The rows all populate with data.

 

Here is the app with both endpoints available:

https://my.roku.com/account/add?channel=JPQ6ZN

 

e3f9d50ab6084ec8f2074ba76e6c604d.jpg

 

dca847e5fd0129cb7e31f59c6a17d5df.jpg

 

Now for the bad news, the results cannot be paged, they contain no total record count value, and it is passed as a list, rather than an associative array. I didnt test too far before I saw these shortcomings and gave up on this for the time being. You can see what I mean using the TEST app above.

 

Because the /items/latest endpoint cannot be paged, there is no way to lazy load that row. It doesnt respect the start index and it doesnt give a total record count. This is required for lazy loading. So the first 8 items load, and since the app cant tell a total record count assumes this is all there is. Go into an item, and back out, causing the screen to refresh and paginate. It now grabs the full 100 items. But... these repeat, since it doesnt respect the startindex. So the first 8 show, then the first 8 show up again and the rest are fine after this all the way to 100.

 

This is the same problem search has which forced me to ditch lazy loading rows there. It is harder to ditch lazy loading on the homescreen since it has so much possibility and the toggles and it is already very busy there. Lazy loading keeps the UI fluid and no having to wait to navigate rows until metadata/images for that row are loaded.

 

Also tvshows are merged in /items/latest into a single show no matter how many new episodes there are which are new. The max shown is always the 1 item, the show itself as the item. You might already know this. This is how the web client works too.

 

On the roku this also would require special handling which I have not incorporated yet. Clicking into the latest episodes will presently jump into the tv series season screen, not an items detail screen. This is because there are multiple items and it sees that as a complete series. There will have to be an interim screen used to show the new episodes after clicking. This is difficult (read as not hard, but isnt exactly quick to adapt to either). This is why other apps havent adopted this already.

 

@@Luke

 

is there a reason /items/latest doesnt make use of the startindex and totalrecordcount and why does it return as an array list and not as an associative array? It almost looks not ready for prime time. I have the roku app working properly its just the roku uses gridscreen for the homescreen. The gridscreen issues one command to paginate the data loading. So it cannot be "specially tailored" to react differently for that endpoint when using that specific row, within that specific latest toggle. Not without alot of work adding parameters and modifying many many function calls. Can you possibly allow respecting start index, add total record count, and wrap the list inside an associative array as items? Pretty please, sugar on top too. Even a cherry. Thanks.

Edited by speechles
Posted

Just add TotalRecordCount to the Fields parameter on your query and it will function just as you expect.  This is optional because latest rows are usually just limited in number instead of being an entire sorted list.

 

You should just use the latest end point because it will also take into account the user's settings for which libraries should be included.

Posted

I do add the total record count based on .count() but like i said, it does not paginate. It doesnt respect start index. It cant be lazy loaded without respecting start index. This causes repeated items when you fetch again. The homescreen has to use lazy loading. So in effect, cannot use /items/lates because it is crippled in this manner.

 

Sent from my Nexus 7 using Tapatalk

Posted (edited)

@@ebr

How do you get latest to give a true totalrecordcount? Using fields doesnt appear to work. I do notice now "groupitems" set to false fixes the episodes. Now they are singular. But how can I lazy load this? I am sooo close. Its just the paginated data loader works on start and total. To start it grabs 8 items (these fill part of the screen the user initially sees) when the user moves beyond what is shown it will fetch the rest until it reachs the totalrecordcount. Because the response is an array list its missing totalrecordcount. So i take .count() and have it treat this as totalrecordcount. This is obviously wrong. How can I make this work? Is there a way to and lazy load this row sill?

Its EnableTotalRecordCount: "true" that is supposed to do this? It doesnt appear to cause an associative array response. Its the same array list.. *sigh*

I want to help but...

This is confusing and hard because of a serious lack of documentation. @@Luke could you possibly throw a dog a bone? Bark bark.. please

url = GetServerBaseUrl()
url = url + "/Users/" + HttpEncode(getGlobalVar("user").Id) + "/Items/Latest?IncludeItemTypes=Episode"
query = {
   parentid: parentid
   fields: "PrimaryImageAspectRatio,Overview"
   ImageTypeLimit: "1"
   EnableImageTypes: "Primary,Backdrop,Banner,Thumb"
   GroupItems: "false"
   EnableTotalRecordCount: "true"
}

Here is the example for episodes. Anything I am missing or doing wrong?

Ever had that itch, the one your cant reach to scratch. That is what this is like. At least right now, somebody help and scratch me...lol

Edited by speechles
pir8radio
Posted

I'm still a little hazy on why the default emby roku app (that all of my users have) display the wrong info under latest media. What can be done to get that corrected?

Posted (edited)

I'm still a little hazy on why the default emby roku app (that all of my users have) display the wrong info under latest media. What can be done to get that corrected?

The default roku app is controlled by developers. This means you need them to look at this issue as important enough and make a solution. I am only trying to see how this would be done and make it possible now. So I made an app can be used Immediately to test it out. It comes with the caveats I have mentioned. Luke never replied to my questions above. I am as curious as you are as to how this will be handled. I dont understand why the time wasnt taken to just answer my question so I could hammer this out. It is disheartening wanting to fix things and obstacles one cant control prevents it. Sorry I cant be more help.

 

Youve changed the created dates on your files to match release dates. Now you exposed the problem. Latest isnt using /items/latest it uses /items with sortby on date created and sort order by descending. You can now see the problem, effectively before users could sort by date created or release date. You made them the same with time lord. date created is release date now. The view they see now isnt latest. It is sorted by release date in decreasing order. This is the difference.

 

If we could change this to /items/latest it makes your users happy. In fact, I left both options available to pick and choose from to make everybody happy.

Edited by speechles
  • Like 1

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