mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Fix eslint errors (syntax)
This commit is contained in:
parent
6d6d03a9c6
commit
840fbed68a
1 changed files with 4 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
||||||
import type {BaseItemDtoQueryResult} from '@jellyfin/sdk/lib/generated-client';
|
import type { BaseItemDtoQueryResult } from '@jellyfin/sdk/lib/generated-client';
|
||||||
import {ApiClient} from 'jellyfin-apiclient';
|
import { ApiClient } from 'jellyfin-apiclient';
|
||||||
|
|
||||||
interface GetItemsRequest {
|
interface GetItemsRequest {
|
||||||
Ids?: string;
|
Ids?: string;
|
||||||
|
@ -9,13 +9,13 @@ interface GetItemsRequest {
|
||||||
const ITEMS_PER_REQUEST_LIMIT = 25;
|
const ITEMS_PER_REQUEST_LIMIT = 25;
|
||||||
|
|
||||||
function getItemsSplit(apiClient: ApiClient, userId: string, options: GetItemsRequest) {
|
function getItemsSplit(apiClient: ApiClient, userId: string, options: GetItemsRequest) {
|
||||||
const optionsTemplate = {...options};
|
const optionsTemplate = { ...options };
|
||||||
const ids = options.Ids!.split(',');
|
const ids = options.Ids!.split(',');
|
||||||
const results = [];
|
const results = [];
|
||||||
const limit = options.Limit ?? Infinity;
|
const limit = options.Limit ?? Infinity;
|
||||||
|
|
||||||
let end;
|
let end;
|
||||||
for (let start: number = 0; start < ids.length && start < limit; start = end) {
|
for (let start = 0; start < ids.length && start < limit; start = end) {
|
||||||
end = start + ITEMS_PER_REQUEST_LIMIT;
|
end = start + ITEMS_PER_REQUEST_LIMIT;
|
||||||
if (end > limit) {
|
if (end > limit) {
|
||||||
end = limit;
|
end = limit;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue