mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Fix pagination on live tv pages
This commit is contained in:
parent
8a384f585d
commit
64b3fc80dc
1 changed files with 6 additions and 6 deletions
|
@ -15,12 +15,12 @@ import { appRouter } from '../components/appRouter';
|
||||||
|
|
||||||
/* eslint-disable indent */
|
/* eslint-disable indent */
|
||||||
|
|
||||||
function getInitialLiveTvQuery(instance, params) {
|
function getInitialLiveTvQuery(instance, params, startIndex = 0, limit = 300) {
|
||||||
const query = {
|
const query = {
|
||||||
UserId: ServerConnections.getApiClient(params.serverId).getCurrentUserId(),
|
UserId: ServerConnections.getApiClient(params.serverId).getCurrentUserId(),
|
||||||
StartIndex: 0,
|
StartIndex: startIndex,
|
||||||
Fields: 'ChannelInfo,PrimaryImageAspectRatio',
|
Fields: 'ChannelInfo,PrimaryImageAspectRatio',
|
||||||
Limit: 300
|
Limit: limit
|
||||||
};
|
};
|
||||||
|
|
||||||
if (params.type === 'Recordings') {
|
if (params.type === 'Recordings') {
|
||||||
|
@ -244,15 +244,15 @@ import { appRouter } from '../components/appRouter';
|
||||||
|
|
||||||
instance.queryRecursive = false;
|
instance.queryRecursive = false;
|
||||||
if (params.type === 'Recordings') {
|
if (params.type === 'Recordings') {
|
||||||
return apiClient.getLiveTvRecordings(getInitialLiveTvQuery(instance, params));
|
return apiClient.getLiveTvRecordings(getInitialLiveTvQuery(instance, params, startIndex, limit));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.type === 'Programs') {
|
if (params.type === 'Programs') {
|
||||||
if (params.IsAiring === 'true') {
|
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') {
|
if (params.type === 'nextup') {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue