mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add episode setting
This commit is contained in:
parent
91cedefe29
commit
97de2542b7
5 changed files with 38 additions and 32 deletions
|
@ -514,46 +514,47 @@
|
|||
}
|
||||
else if (smart && firstItem.Type == "Episode" && items.length == 1) {
|
||||
|
||||
promise = ApiClient.getEpisodes(firstItem.SeriesId, {
|
||||
IsVirtualUnaired: false,
|
||||
IsMissing: false,
|
||||
UserId: ApiClient.getCurrentUserId(),
|
||||
Fields: getItemFields
|
||||
promise = ApiClient.getCurrentUser().then(function(user) {
|
||||
|
||||
if (!user.Configuration.EnableEpisodeAutoQueue) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}).then(function (episodesResult) {
|
||||
return ApiClient.getEpisodes(firstItem.SeriesId, {
|
||||
IsVirtualUnaired: false,
|
||||
IsMissing: false,
|
||||
UserId: ApiClient.getCurrentUserId(),
|
||||
Fields: getItemFields
|
||||
|
||||
var foundItem = false;
|
||||
episodesResult.Items = episodesResult.Items.filter(function (e) {
|
||||
}).then(function (episodesResult) {
|
||||
|
||||
if (foundItem) {
|
||||
return true;
|
||||
}
|
||||
if (e.Id == firstItem.Id) {
|
||||
foundItem = true;
|
||||
return true;
|
||||
}
|
||||
var foundItem = false;
|
||||
episodesResult.Items = episodesResult.Items.filter(function (e) {
|
||||
|
||||
return false;
|
||||
if (foundItem) {
|
||||
return true;
|
||||
}
|
||||
if (e.Id == firstItem.Id) {
|
||||
foundItem = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
episodesResult.TotalRecordCount = episodesResult.Items.length;
|
||||
return episodesResult;
|
||||
});
|
||||
episodesResult.TotalRecordCount = episodesResult.Items.length;
|
||||
return episodesResult;
|
||||
});
|
||||
}
|
||||
|
||||
if (promise) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
return promise.then(function (result) {
|
||||
|
||||
promise.then(function (result) {
|
||||
|
||||
resolve(result.Items);
|
||||
});
|
||||
return result ? result.Items : items;
|
||||
});
|
||||
} else {
|
||||
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
||||
resolve(items);
|
||||
});
|
||||
return Promise.resolve(items);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
$('#selectAudioLanguage', page).val(user.Configuration.AudioLanguagePreference || "");
|
||||
$('#selectSubtitleLanguage', page).val(user.Configuration.SubtitleLanguagePreference || "");
|
||||
page.querySelector('.chkEpisodeAutoPlay').checked = user.Configuration.EnableEpisodeAutoQueue;
|
||||
});
|
||||
|
||||
$('#selectSubtitlePlaybackMode', page).val(user.Configuration.SubtitleMode || "").trigger('change');
|
||||
|
@ -93,6 +94,7 @@
|
|||
|
||||
user.Configuration.SubtitleMode = $('#selectSubtitlePlaybackMode', page).val();
|
||||
user.Configuration.PlayDefaultAudioTrack = page.querySelector('.chkPlayDefaultAudioTrack').checked;
|
||||
user.Configuration.EnableEpisodeAutoQueue = page.querySelector('.chkEpisodeAutoPlay').checked;
|
||||
|
||||
AppSettings.enableCinemaMode(page.querySelector('.chkEnableCinemaMode').checked);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue