mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Check if there are multiple parts before requesting them
If the property exists it should always be larger than 1 so the second check isn't really needed
This commit is contained in:
parent
1d67f43a2e
commit
93f42e3469
1 changed files with 1 additions and 1 deletions
|
@ -2168,7 +2168,7 @@ class PlaybackManager {
|
||||||
const getAdditionalParts = async (items) => {
|
const getAdditionalParts = async (items) => {
|
||||||
const getOneAdditionalPart = async function (item) {
|
const getOneAdditionalPart = async function (item) {
|
||||||
let retVal = [item];
|
let retVal = [item];
|
||||||
if (item.Type === 'Movie' || item.Type === 'Episode') {
|
if (item.PartCount && item.PartCount > 1 && (item.Type === 'Movie' || item.Type === 'Episode')) {
|
||||||
const client = ServerConnections.getApiClient(item.ServerId);
|
const client = ServerConnections.getApiClient(item.ServerId);
|
||||||
const user = await client.getCurrentUser();
|
const user = await client.getCurrentUser();
|
||||||
const additionalParts = await client.getAdditionalVideoParts(user.Id, item.Id);
|
const additionalParts = await client.getAdditionalVideoParts(user.Id, item.Id);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue