1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge pull request #5416 from jellyfin/bond-multiparts

Check if there are multiple parts before requesting them
This commit is contained in:
Andrew Rabert 2024-04-24 13:17:01 -04:00 committed by GitHub
commit 074467e018
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2157,7 +2157,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);