From 64b3fc80dcbaa93c080b5ca7b10aac8c3a74ed35 Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Wed, 9 Feb 2022 01:16:03 -0500 Subject: [PATCH] Fix pagination on live tv pages --- src/controllers/list.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/controllers/list.js b/src/controllers/list.js index b2be0bbd00..ceb12e7c34 100644 --- a/src/controllers/list.js +++ b/src/controllers/list.js @@ -15,12 +15,12 @@ import { appRouter } from '../components/appRouter'; /* eslint-disable indent */ - function getInitialLiveTvQuery(instance, params) { + function getInitialLiveTvQuery(instance, params, startIndex = 0, limit = 300) { const query = { UserId: ServerConnections.getApiClient(params.serverId).getCurrentUserId(), - StartIndex: 0, + StartIndex: startIndex, Fields: 'ChannelInfo,PrimaryImageAspectRatio', - Limit: 300 + Limit: limit }; if (params.type === 'Recordings') { @@ -244,15 +244,15 @@ import { appRouter } from '../components/appRouter'; instance.queryRecursive = false; if (params.type === 'Recordings') { - return apiClient.getLiveTvRecordings(getInitialLiveTvQuery(instance, params)); + return apiClient.getLiveTvRecordings(getInitialLiveTvQuery(instance, params, startIndex, limit)); } if (params.type === 'Programs') { if (params.IsAiring === 'true') { - return apiClient.getLiveTvRecommendedPrograms(getInitialLiveTvQuery(instance, params)); + return apiClient.getLiveTvRecommendedPrograms(getInitialLiveTvQuery(instance, params, startIndex, limit)); } - return apiClient.getLiveTvPrograms(getInitialLiveTvQuery(instance, params)); + return apiClient.getLiveTvPrograms(getInitialLiveTvQuery(instance, params, startIndex, limit)); } if (params.type === 'nextup') {