diff --git a/dashboard-ui/cinemamodeconfiguration.html b/dashboard-ui/cinemamodeconfiguration.html index 154e9d3557..e88fe7c513 100644 --- a/dashboard-ui/cinemamodeconfiguration.html +++ b/dashboard-ui/cinemamodeconfiguration.html @@ -68,16 +68,22 @@
${LabelCustomIntrosPathHelp}

+
+
+ + +
+
+
${LabelCodecIntrosPathHelp}
+
${ButtonLearnMore}
+
+
+
+
+

${CinemaModeConfigurationHelp2}

- diff --git a/dashboard-ui/scripts/cinemamodeconfiguration.js b/dashboard-ui/scripts/cinemamodeconfiguration.js index 9986818430..4277eab38d 100644 --- a/dashboard-ui/scripts/cinemamodeconfiguration.js +++ b/dashboard-ui/scripts/cinemamodeconfiguration.js @@ -16,6 +16,7 @@ $('.chkEnableParentalControl', page).checked(config.EnableIntrosParentalControl); $('#txtCustomIntrosPath', page).val(config.CustomIntroPath || ''); + $('#txtCodecIntrosPath', page).val(config.MediaInfoIntroPath || ''); $('#txtNumTrailers', page).val(config.TrailerLimit); Dashboard.hideLoadingMsg(); @@ -31,6 +32,7 @@ ApiClient.getNamedConfiguration("cinemamode").then(function (config) { config.CustomIntroPath = $('#txtCustomIntrosPath', page).val(); + config.MediaInfoIntroPath = $('#txtCodecIntrosPath', page).val(); config.TrailerLimit = $('#txtNumTrailers', page).val(); config.EnableIntrosForMovies = $('.chkMovies', page).checked(); @@ -76,6 +78,27 @@ }); }); + $('#btnSelectCodecIntrosPath', page).on("click.selectDirectory", function () { + + require(['directorybrowser'], function (directoryBrowser) { + + var picker = new directoryBrowser(); + + picker.show({ + + callback: function (path) { + + if (path) { + $('#txtCodecIntrosPath', page).val(path); + } + picker.close(); + }, + + header: Globalize.translate('HeaderSelectCodecIntrosPath') + }); + }); + }); + $('.cinemaModeConfigurationForm').off('submit', onSubmit).on('submit', onSubmit); }).on('pageshow', "#cinemaModeConfigurationPage", function () { diff --git a/dashboard-ui/strings/html/server.json b/dashboard-ui/strings/html/server.json index 47281f7c8e..ee35e5b29f 100644 --- a/dashboard-ui/strings/html/server.json +++ b/dashboard-ui/strings/html/server.json @@ -1542,5 +1542,7 @@ "HeadersFolders": "Folders", "LabelDisplayName": "Display name:", "HeaderNewRecording": "New Recording", - "ButtonAdvanced": "Advanced" + "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." } diff --git a/dashboard-ui/strings/javascript/javascript.json b/dashboard-ui/strings/javascript/javascript.json index 940d982528..0aa1ecc10f 100644 --- a/dashboard-ui/strings/javascript/javascript.json +++ b/dashboard-ui/strings/javascript/javascript.json @@ -957,5 +957,6 @@ "CoverArt": "Cover Art", "ButtonOff": "Off", "TitleHardwareAcceleration": "Hardware Acceleration", - "HardwareAccelerationWarning": "Enabling hardware acceleration may cause instability in some environments. If you have difficulty playing video after enabling this, you'll need to change the setting back to Auto." + "HardwareAccelerationWarning": "Enabling hardware acceleration may cause instability in some environments. If you have difficulty playing video after enabling this, you'll need to change the setting back to Auto.", + "HeaderSelectCodecIntrosPath": "Select Codec Intros Path" }