1
0
Fork 0
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:
Luke Pulverenti 2016-02-25 08:36:24 -05:00
parent 91cedefe29
commit 97de2542b7
5 changed files with 38 additions and 32 deletions

View file

@ -83,9 +83,10 @@
<label for="selectMaxChromecastBitrate" class="selectLabel">${LabelMaxChromecastBitrate}</label> <label for="selectMaxChromecastBitrate" class="selectLabel">${LabelMaxChromecastBitrate}</label>
<select id="selectMaxChromecastBitrate" data-mini="true"></select> <select id="selectMaxChromecastBitrate" data-mini="true"></select>
</div> </div>
<div style="margin-top:2em;">
<div class="fldExternalPlayer" style="display: none;"> <paper-checkbox class="chkEpisodeAutoPlay">${OptionPlayNextEpisodeAutomatically}</paper-checkbox>
<br /> </div>
<div class="fldExternalPlayer" style="margin-top:2em;display: none;">
<paper-checkbox class="chkExternalVideoPlayer">${OptionEnableExternalVideoPlayers}</paper-checkbox> <paper-checkbox class="chkExternalVideoPlayer">${OptionEnableExternalVideoPlayers}</paper-checkbox>
<div class="fieldDescription paperCheckboxFieldDescription"> <div class="fieldDescription paperCheckboxFieldDescription">
<div style="display:none;" class="labelGenericExternalPlayers">${LabelExternalPlayersHelp}</div> <div style="display:none;" class="labelGenericExternalPlayers">${LabelExternalPlayersHelp}</div>

View file

@ -514,46 +514,47 @@
} }
else if (smart && firstItem.Type == "Episode" && items.length == 1) { else if (smart && firstItem.Type == "Episode" && items.length == 1) {
promise = ApiClient.getEpisodes(firstItem.SeriesId, { promise = ApiClient.getCurrentUser().then(function(user) {
IsVirtualUnaired: false,
IsMissing: false,
UserId: ApiClient.getCurrentUserId(),
Fields: getItemFields
}).then(function (episodesResult) { if (!user.Configuration.EnableEpisodeAutoQueue) {
return null;
}
var foundItem = false; return ApiClient.getEpisodes(firstItem.SeriesId, {
episodesResult.Items = episodesResult.Items.filter(function (e) { IsVirtualUnaired: false,
IsMissing: false,
UserId: ApiClient.getCurrentUserId(),
Fields: getItemFields
if (foundItem) { }).then(function (episodesResult) {
return true;
}
if (e.Id == firstItem.Id) {
foundItem = true;
return true;
}
return false; var foundItem = false;
episodesResult.Items = episodesResult.Items.filter(function (e) {
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) { if (promise) {
return new Promise(function (resolve, reject) { return promise.then(function (result) {
promise.then(function (result) { return result ? result.Items : items;
resolve(result.Items);
});
}); });
} else { } else {
return new Promise(function (resolve, reject) { return Promise.resolve(items);
resolve(items);
});
} }
} }

View file

@ -25,6 +25,7 @@
$('#selectAudioLanguage', page).val(user.Configuration.AudioLanguagePreference || ""); $('#selectAudioLanguage', page).val(user.Configuration.AudioLanguagePreference || "");
$('#selectSubtitleLanguage', page).val(user.Configuration.SubtitleLanguagePreference || ""); $('#selectSubtitleLanguage', page).val(user.Configuration.SubtitleLanguagePreference || "");
page.querySelector('.chkEpisodeAutoPlay').checked = user.Configuration.EnableEpisodeAutoQueue;
}); });
$('#selectSubtitlePlaybackMode', page).val(user.Configuration.SubtitleMode || "").trigger('change'); $('#selectSubtitlePlaybackMode', page).val(user.Configuration.SubtitleMode || "").trigger('change');
@ -93,6 +94,7 @@
user.Configuration.SubtitleMode = $('#selectSubtitlePlaybackMode', page).val(); user.Configuration.SubtitleMode = $('#selectSubtitlePlaybackMode', page).val();
user.Configuration.PlayDefaultAudioTrack = page.querySelector('.chkPlayDefaultAudioTrack').checked; user.Configuration.PlayDefaultAudioTrack = page.querySelector('.chkPlayDefaultAudioTrack').checked;
user.Configuration.EnableEpisodeAutoQueue = page.querySelector('.chkEpisodeAutoPlay').checked;
AppSettings.enableCinemaMode(page.querySelector('.chkEnableCinemaMode').checked); AppSettings.enableCinemaMode(page.querySelector('.chkEnableCinemaMode').checked);

View file

@ -1528,5 +1528,6 @@
"HeaderNewRecording": "New Recording", "HeaderNewRecording": "New Recording",
"ButtonAdvanced": "Advanced", "ButtonAdvanced": "Advanced",
"LabelCodecIntrosPath": "Codec intros path:", "LabelCodecIntrosPath": "Codec intros path:",
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature." "LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature.",
"OptionPlayNextEpisodeAutomatically": "Play next episode automatically"
} }

View file

@ -1542,5 +1542,6 @@
"OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 for easy playback on your devices.", "OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 for easy playback on your devices.",
"FeatureRequiresEmbyPremiere": "This feature requires an active Emby Premiere subscription.", "FeatureRequiresEmbyPremiere": "This feature requires an active Emby Premiere subscription.",
"FileExtension": "File extension", "FileExtension": "File extension",
"OptionReplaceExistingImages": "Replace existing images" "OptionReplaceExistingImages": "Replace existing images",
"OptionPlayNextEpisodeAutomatically": "Play next episode automatically"
} }