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

Add people in searchDiscover response #1158

Open
BenjaminOddou opened this issue May 17, 2023 · 0 comments
Open

Add people in searchDiscover response #1158

BenjaminOddou opened this issue May 17, 2023 · 0 comments

Comments

@BenjaminOddou
Copy link
Contributor

What is your feature request?

I'd like to use searchDiscover() to return people objects. For now this is not possible.

Are there any workarounds?

Yes using MyPlexAccount.query() function.

Code Snippets

plex_account = MyPlexAccount(plexToken)

headers = {
    'Accept': 'application/json'
}
params = {
    'query': 'zendaya',
    'limit': 30,
    'searchTypes': 'people',
    'includeMetadata': 1,
    'filterPeople': 1
}

test = plex_account.query('https://metadata.provider.plex.tv/library/search?', headers=headers, params=params)
print(test)

# Response

{'MediaContainer': {'suggestedTerms': [], 'identifier': 'tv.plex.provider.metadata', 'size': 1, 'SearchResults': [{'id': 'people', 'title': 'People', 'size': 1, 'SearchResult': [{'Directory': {'bornAt': '1996-09-01', 'key': '/library/people/5d7768d2ebdf2200209c916d', 'metadataId': '5d7768d2ebdf2200209c916d', 'slug': 'zendaya', 'thumb': 'https://metadata-static.plex.tv/8/people/868e9505c5a89efc4477e2d4eb1617fb.jpg', 'title': 'Zendaya', 'type': 'person', 'source': 'provider://tv.plex.provider.metadata', 'CreditType': [{'type': 'actor', 'count': 98, 'title': 'Actor'}, {'type': 'producer', 'count': 23, 'title': 'Producer'}, {'type': 'music', 'count': 18, 'title': 'Composer'}, {'type': 'writer', 'count': 1, 'title': 'Writer'}]}, 'score': 1}]}]}}

Additional Context

No response

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

Successfully merging a pull request may close this issue.

1 participant