Browse Source

fix jellyfin tv paging (#831)

pull/832/head
Jason Dove 4 years ago committed by GitHub
parent
commit
b4f19e6de4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      CHANGELOG.md
  2. 5
      ErsatzTV.Infrastructure/Jellyfin/JellyfinApiClient.cs

2
CHANGELOG.md

@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file. @@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [Unreleased]
### Fixed
- Fix Jellyfin show library paging
## [0.6.0-beta] - 2022-06-01
### Fixed

5
ErsatzTV.Infrastructure/Jellyfin/JellyfinApiClient.cs

@ -261,8 +261,11 @@ public class JellyfinApiClient : IJellyfinApiClient @@ -261,8 +261,11 @@ public class JellyfinApiClient : IJellyfinApiClient
if (_memoryCache.TryGetValue($"jellyfin_admin_user_id.{mediaSourceId}", out string userId))
{
IJellyfinApi service = RestService.For<IJellyfinApi>(address);
string filters = itemType == JellyfinItemType.Movie || itemType == JellyfinItemType.Episode
? "IsNotFolder"
: null;
int size = await service
.GetLibraryStats(apiKey, userId, parentId, itemType)
.GetLibraryStats(apiKey, userId, parentId, itemType, filters: filters)
.Map(r => r.TotalRecordCount);
const int PAGE_SIZE = 10;

Loading…
Cancel
Save