${LabelExternalPlayersHelp}
diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js
index c75a85897..c7aae13a1 100644
--- a/dashboard-ui/scripts/mediaplayer.js
+++ b/dashboard-ui/scripts/mediaplayer.js
@@ -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);
}
}
diff --git a/dashboard-ui/scripts/mypreferenceslanguages.js b/dashboard-ui/scripts/mypreferenceslanguages.js
index e062f6825..8e03364bc 100644
--- a/dashboard-ui/scripts/mypreferenceslanguages.js
+++ b/dashboard-ui/scripts/mypreferenceslanguages.js
@@ -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);
diff --git a/dashboard-ui/strings/html/en-US.json b/dashboard-ui/strings/html/en-US.json
index 3e730dba1..846abd27d 100644
--- a/dashboard-ui/strings/html/en-US.json
+++ b/dashboard-ui/strings/html/en-US.json
@@ -1528,5 +1528,6 @@
"HeaderNewRecording": "New Recording",
"ButtonAdvanced": "Advanced",
"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"
}
\ No newline at end of file
diff --git a/dashboard-ui/strings/html/server.json b/dashboard-ui/strings/html/server.json
index 5f163f674..3c63a1f3c 100644
--- a/dashboard-ui/strings/html/server.json
+++ b/dashboard-ui/strings/html/server.json
@@ -1542,5 +1542,6 @@
"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.",
"FileExtension": "File extension",
- "OptionReplaceExistingImages": "Replace existing images"
+ "OptionReplaceExistingImages": "Replace existing images",
+ "OptionPlayNextEpisodeAutomatically": "Play next episode automatically"
}