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

Fix incorrect flag check preventing expected behavior when navigating to next episode

This commit is contained in:
Connor Smith 2024-04-20 01:41:23 -04:00
parent b38ac26fcf
commit 13dfa62eb4

View file

@ -18,6 +18,7 @@ import { PluginType } from '../../types/plugin.ts';
import { includesAny } from '../../utils/container.ts';
import { getItems } from '../../utils/jellyfin-apiclient/getItems.ts';
import { getItemBackdropImageUrl } from '../../utils/jellyfin-apiclient/backdropImage';
import { MediaType } from '@jellyfin/sdk/lib/generated-client/models/media-type';
import { MediaError } from 'types/mediaError';
import { getMediaError } from 'utils/mediaError';
@ -1934,8 +1935,7 @@ class PlaybackManager {
promise = new Promise(function (resolve, reject) {
const apiClient = ServerConnections.getApiClient(firstItem.ServerId);
apiClient.getCurrentUser().then(function (user) {
if (!user.Configuration.EnableNextEpisodeAutoPlay || !firstItem.SeriesId) {
if (!firstItem.SeriesId) {
resolve(null);
return;
}
@ -1962,7 +1962,6 @@ class PlaybackManager {
resolve(episodesResult);
}, reject);
});
});
}
if (promise) {
@ -3313,8 +3312,14 @@ class PlaybackManager {
if (errorOccurred) {
showPlaybackInfoErrorMessage(self, 'PlaybackError' + displayErrorCode);
} else if (nextItem) {
const apiClient = ServerConnections.getApiClient(nextItem.item.ServerId);
apiClient.getCurrentUser().then(function (user) {
if (user.Configuration.EnableNextEpisodeAutoPlay || nextMediaType !== MediaType.Video) {
self.nextTrack();
}
});
}
}
function onPlaybackChanging(activePlayer, newPlayer, newItem) {