jensenkd / plex-api

.NET Core SDK for Plex Media Server
MIT License
86 stars 27 forks source link

Add TotalSize property to HistoryMediaContainer #73

Closed elzik closed 2 years ago

elzik commented 2 years ago

Is your feature request related to a problem? Please describe.

The HistoryMediaContainer does not include a TotalSize property in the same way that the MediaContainer does. This means that when calling IPlexServerClient.GetPlayHistory() it is not possible to know when all the play history has been returned.

Describe the solution you'd like

I'd like to see a TotalSize property added to the HistoryMediaContainer.

Describe alternatives you've considered

You can just keep calling the IPlexServerClient.GetPlayHistory() method with incremented start parameter until the container's HistoryMetadata is returned as null (or size is zero) signifying that even though we don't know the total size, we must have exceeded it. Whilst this works, it is not ideal and an additional HTTP GET is required and wasted. Since the Plex API does return a correctly populated totalSize in its response it would be useful to pass this back.

jensenkd commented 2 years ago

Added and will be in the next release.