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

totalSize of MediaContainer #1372

Closed
Dr-Blank opened this issue Feb 21, 2024 · 0 comments · Fixed by #1373
Closed

totalSize of MediaContainer #1372

Dr-Blank opened this issue Feb 21, 2024 · 0 comments · Fixed by #1373

Comments

@Dr-Blank
Copy link
Contributor

What is your feature request?

api returns a bunch of metadata along with items fetched one of which is totalSize

it is useful in showing totalItems on the server without fetching all of them

other attributes are offset and size, standard pagination stuff

Are there any workarounds?

fetchItems already uses this info

total_size = utils.cast(int, data.attrib.get('totalSize') or data.attrib.get('size')) or len(subresults)

Code Snippets

tracks = music_section.searchTracks(maxresults=100)
print(f'showing {len(tracks)} of {tracks.totalSize} starting at {tracks.offset}')

Additional Context

image
as on plex web

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