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:
parent
b38ac26fcf
commit
13dfa62eb4
1 changed files with 32 additions and 27 deletions
|
@ -18,6 +18,7 @@ import { PluginType } from '../../types/plugin.ts';
|
||||||
import { includesAny } from '../../utils/container.ts';
|
import { includesAny } from '../../utils/container.ts';
|
||||||
import { getItems } from '../../utils/jellyfin-apiclient/getItems.ts';
|
import { getItems } from '../../utils/jellyfin-apiclient/getItems.ts';
|
||||||
import { getItemBackdropImageUrl } from '../../utils/jellyfin-apiclient/backdropImage';
|
import { getItemBackdropImageUrl } from '../../utils/jellyfin-apiclient/backdropImage';
|
||||||
|
import { MediaType } from '@jellyfin/sdk/lib/generated-client/models/media-type';
|
||||||
|
|
||||||
import { MediaError } from 'types/mediaError';
|
import { MediaError } from 'types/mediaError';
|
||||||
import { getMediaError } from 'utils/mediaError';
|
import { getMediaError } from 'utils/mediaError';
|
||||||
|
@ -1934,8 +1935,7 @@ class PlaybackManager {
|
||||||
promise = new Promise(function (resolve, reject) {
|
promise = new Promise(function (resolve, reject) {
|
||||||
const apiClient = ServerConnections.getApiClient(firstItem.ServerId);
|
const apiClient = ServerConnections.getApiClient(firstItem.ServerId);
|
||||||
|
|
||||||
apiClient.getCurrentUser().then(function (user) {
|
if (!firstItem.SeriesId) {
|
||||||
if (!user.Configuration.EnableNextEpisodeAutoPlay || !firstItem.SeriesId) {
|
|
||||||
resolve(null);
|
resolve(null);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1962,7 +1962,6 @@ class PlaybackManager {
|
||||||
resolve(episodesResult);
|
resolve(episodesResult);
|
||||||
}, reject);
|
}, reject);
|
||||||
});
|
});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (promise) {
|
if (promise) {
|
||||||
|
@ -3313,8 +3312,14 @@ class PlaybackManager {
|
||||||
if (errorOccurred) {
|
if (errorOccurred) {
|
||||||
showPlaybackInfoErrorMessage(self, 'PlaybackError' + displayErrorCode);
|
showPlaybackInfoErrorMessage(self, 'PlaybackError' + displayErrorCode);
|
||||||
} else if (nextItem) {
|
} else if (nextItem) {
|
||||||
|
const apiClient = ServerConnections.getApiClient(nextItem.item.ServerId);
|
||||||
|
|
||||||
|
apiClient.getCurrentUser().then(function (user) {
|
||||||
|
if (user.Configuration.EnableNextEpisodeAutoPlay || nextMediaType !== MediaType.Video) {
|
||||||
self.nextTrack();
|
self.nextTrack();
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPlaybackChanging(activePlayer, newPlayer, newItem) {
|
function onPlaybackChanging(activePlayer, newPlayer, newItem) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue