Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-load guids for sections.all() #808

Closed
glensc opened this issue Aug 1, 2021 · 8 comments · Fixed by #831
Closed

Pre-load guids for sections.all() #808

glensc opened this issue Aug 1, 2021 · 8 comments · Fixed by #831

Comments

@glensc
Copy link
Contributor

glensc commented Aug 1, 2021

Describe the issue

The library xml that contains all movie details, does have guid, but not guids attribute, so iterating such feed must always make sub-request to "reload" for "guids" attribute.

I.e. the feed XML like:

contains:

    <Video
        ratingKey="1053" 
        key="/library/metadata/1053" 
        guid="plex://movie/5d776d18f617c900201863b0"

Code typically to process such feed is:

for section in plex.library.sections():
	for movie in section.all():
		print(movie)

processing such feed is preferred performance-wise for when processing the whole library.

The reload could be avoided if the XML contains also XML nodes for guids.

Is it possible to pass some extra param for PMS, so it would include such details? could such support be requested from PMS if not yet possible?

Additional context

Originally thought this affects only Legacy Movie Agent:

@JonnyWong16
Copy link
Collaborator

There is no include parameter in the Plex Media Server API to include <Guid> in the /all response. That is something that should be requested from Plex.

@glensc
Copy link
Contributor Author

glensc commented Aug 2, 2021

Isn't there a generic one, like this?

&includeFields=thumbBlurHash%2CartBlurHash

@JonnyWong16
Copy link
Collaborator

There is no include parameter to include <Guid>. Unless there is one that I don't know about.

@glensc
Copy link
Contributor Author

glensc commented Aug 2, 2021

I as having in mind, that includeFields looks like generic one:

  • &includeFields=thumbBlurHash%2CartBlurHash
  • &includeFields=guids

I'm just guessing here.

@JonnyWong16
Copy link
Collaborator

There is no include parameter to include <Guid>.

@JonnyWong16
Copy link
Collaborator

I posted a feature request on the Plex Forums. You may vote on it.

https://forums.plex.tv/t/add-includeguids-url-parameter-to-return-external-guids/735620

@glensc
Copy link
Contributor Author

glensc commented Sep 16, 2021

@twolaw said:

Yes, very good news!
confirmed in Plex Media Server 1.24.3.5033 (beta version)

@glensc
Copy link
Contributor Author

glensc commented Sep 25, 2021

1.24.3.5033-757abe6b4 seems to be out of beta, at least being updated in brew cask:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants