Fix too long URLs on getItems with many ids
This commit is contained in:
committed by
dann-merlin
parent
5e51616e18
commit
d5e9541010
@@ -6,6 +6,7 @@ import castSenderApiLoader from './castSenderApi';
|
||||
import ServerConnections from '../../components/ServerConnections';
|
||||
import alert from '../../components/alert';
|
||||
import Events from '../../utils/events.ts';
|
||||
import { getItems } from '../../utils/jellyfin-apiclient/getItemsHelper.ts';
|
||||
|
||||
// Based on https://github.com/googlecast/CastVideos-chrome/blob/master/CastVideos.js
|
||||
|
||||
@@ -481,7 +482,9 @@ function getItemsForPlayback(apiClient, query) {
|
||||
query.ExcludeLocationTypes = 'Virtual';
|
||||
query.EnableTotalRecordCount = false;
|
||||
|
||||
return apiClient.getItems(userId, query);
|
||||
// call getItems from getItemsHelper instead of apiClient.getItems()
|
||||
// to split up into multiple requests if necessary (URL might get too long)
|
||||
return getItems(apiClient, userId, query);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
*/
|
||||
|
||||
import Events from '../../../utils/events.ts';
|
||||
import { getItems } from '../../../utils/jellyfin-apiclient/getItemsHelper.ts';
|
||||
|
||||
/**
|
||||
* Constants
|
||||
@@ -88,7 +89,9 @@ export function getItemsForPlayback(apiClient, query) {
|
||||
query.EnableTotalRecordCount = false;
|
||||
query.CollapseBoxSetItems = false;
|
||||
|
||||
return apiClient.getItems(apiClient.getCurrentUserId(), query);
|
||||
// call getItems from getItemsHelper instead of apiClient.getItems()
|
||||
// to split up into multiple requests if necessary (URL might get too long)
|
||||
return getItems(apiClient, apiClient.getCurrentUserId(), query);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user