Jump to content

(Duplicate) Movie discrepancies between API endpoints


roaku

Recommended Posts

This endpoint returns all movies (including duplicates):

/emby/Items?api_key={apikey}&Recursive=true&IncludeItemTypes=Movie&Fields=Path,TagLines,Overview,PremiereDate,Genres,MediaStreams&SortBy=Name&SortOrder=Ascending

 

This endpoint returns all movies (excluding duplicates):

/emby/Users/{userid}/Items?api_key={apikey}&Recursive=true&IncludeItemTypes=Movie&Fields=Path,TagLines,Overview,PremiereDate,Genres,MediaStreams&SortBy=Name&SortOrder=Ascending

 

Both requests are identical except for the base api endpoint. And the User in question can see the entire library.

Is this behavior intentional?

Is there a way for me to get all movies with duplicates from the Users/Items endpoint?

Edited by roaku
Link to comment
Share on other sites

It's sort of intentional. Fetching lists of media in a user-less context is not used a whole lot.

Quote

Is there a way for me to get all movies with duplicates from the Users/Items endpoint?

No, what you get back is a reflection of what the user should see in the user interface.

Link to comment
Share on other sites

Just now, Luke said:

It's sort of intentional. Fetching lists of media in a user-less context is not used a whole lot.

No, what you get back is a reflection of what the user should see in the user interface.

Ok, then. The reason I care is that in the reporting plugin, there's no way to see a complete view of your library because it utilizes the /emby/Users/ path to get to Items rather than the userless path.

I was able to get the duplicates to show up in the reports the way I'd like, but I had to pull down the source, modify ReportsService to use the no argument constructor for InternalItemsQuery, and re-build it locally.

Link to comment
Share on other sites

I think it's for the best to have it be consistent with what you would see in the user interface, otherwise users often interpret that as something and report it as a problem. But obviously for your own private version you can do whatever you like.

Link to comment
Share on other sites

I was going to do some further testing and package it as a configuration option and send it your way, but if you're not interested, that's fine.

I've also tweaked it so it will show me info on *all* audio streams for Video content, including the title field when that's defined, since I've got my movie collection's audio tracks curated with Original, Fallback, Commentary #, Isolated Score and would like to be able to view and export that information.

Again, I was going to package that up as a 'detailed audio info' configuration option, but if it's not something you think anyone else would find useful, no problem.

Link to comment
Share on other sites

  • 2 weeks later...

@Luke

Here's why I described the multi-versioning feature as synthetic and front end only:

First, as I brought up in this thread, when you retrieve movie items through the Users/Items endpoint, you don't get all your movies or a multi-version 'container' of all your movies. What you actually get is all your single entry movies and the *first* (as the DB query sees it?) entry of your multi-version movies. The alternate versions of your multi-version movies don't exist at all through this endpoint. There's no way to retrieve them. You can only see metadata about those *first* entries.

The front ends appear to have been coded to do extra requests once a user clicks on one of these first entries to get and display properties of the alternate versions and it does and this mostly works. Except the resume feature reverts to the first entry not the one you were previously watching, the auto play does too, and it looks like according to that new thread, chapter seeking does the same thing.

And not all of the UI even knows about multi-versioning.

The metadata manager doesn't. Which means there's no way to edit the metadata of alternate versions because they don't exist to it. This 'breaks' (in my opinion) any feature that depends on updating the metadata of alternate versions to work. So far, I know of the parental control feature and tags. Yes, you can workaround the fact that you can't edit the alternate versions of your movies through the UI...but that's proof that something's not working.

It also means plugins like the reporting plugin can't report on all of your movies because it can't see all of your movies. If you're curious how many movies in your collection are 1080p...you can't find out, because you can only retrieve the ones that are single entry or happen to be the first of a multi-version grouping.

This is a synthetic feature that only exists through front end client apps. This wouldn't be that big of a deal on its own, but the API is also hobbled to accommodate it. It lies about the nature of your collection when you retrieve 'all' of a User's view of movies by hiding N number of them.

I don't mean to sound overly critical and I'm very happy overall with Emby, but these are real things that are and aren't happening and so far, the responses suggest there's no plan to even admit this feature needs additional work.

 

 

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

PenkethBoy

All the above is why years ago i created a 4k movie library along side my HD library - so have no multi version movies (and unless i miss one no duplicate copies)

that works for me - but wont work for all as i dont have the remote user "issue" with needing to have a lower quality movie for them etc

As for the hobbled api calls - i suspect it was a quick fix/bad choice at some point back in the past and has never been done properly and now is embedded deep into emby.

The problem is that fundamental changes to the api - have huge knock on effects to all the clients - not impossible to change just a lot of work - and as there are only limited numbers of people using the api directly - it does not get enough traction to be done correctly.

Link to comment
Share on other sites

12 hours ago, PenkethBoy said:

All the above is why years ago i created a 4k movie library along side my HD library - so have no multi version movies (and unless i miss one no duplicate copies)

that works for me - but wont work for all as i dont have the remote user "issue" with needing to have a lower quality movie for them etc

As for the hobbled api calls - i suspect it was a quick fix/bad choice at some point back in the past and has never been done properly and now is embedded deep into emby.

The problem is that fundamental changes to the api - have huge knock on effects to all the clients - not impossible to change just a lot of work - and as there are only limited numbers of people using the api directly - it does not get enough traction to be done correctly.

I'd consider doing that, but beyond higher res duplicates, I have a bunch of Director's Cut/Extended Edition/Roadshow Cut/Final Cut/IMAX/etc versions for lots of my movies.

Plus, I really like the multi-version feature. It's a great idea and the pros of using it outweigh the cons for me so far, even in its current state.

The alternative of having to separate all my multi-versions into individual movies and deal with the unsightliness of 4 cover images of Apollo 13, 3 of Kingdom of Heaven, 3 of T2, etc, etc, etc for a couple hundred of the movies in my collection is a pretty bad one.

Link to comment
Share on other sites

Another thing that breaks under multi-version is the UI's display of metadata.

The theatrical edition of T2 is not 2:33, it's 2:17. And Emby knows this, but because the displayed metadata doesn't update with the version selection change, it can only ever show you the metadata for the first entry in the multi-version set. In this case, it's the extended edition that's 2:33 and will end at 8:00pm.

multi-version-display.png

Link to comment
Share on other sites

PenkethBoy

i think there are FR for that as its been reported a few times

and yes it should deal with that in a dynamic way

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