1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

support codec intros

This commit is contained in:
Luke Pulverenti 2016-02-05 00:59:09 -05:00
parent 512a8ee8d1
commit 843b38bce2
4 changed files with 43 additions and 11 deletions

View file

@ -68,16 +68,22 @@
<div class="fieldDescription">${LabelCustomIntrosPathHelp}</div> <div class="fieldDescription">${LabelCustomIntrosPathHelp}</div>
</div> </div>
<br /> <br />
<div>
<div>
<paper-input type="text" label="${LabelCodecIntrosPath}" id="txtCodecIntrosPath" style="display: inline-block; width: 85%;"></paper-input>
<paper-icon-button id="btnSelectCodecIntrosPath" icon="search"></paper-icon-button>
</div>
<div class="fieldDescription">
<div>${LabelCodecIntrosPathHelp}</div>
<div style="margin-top:.5em;"><a href="https://github.com/MediaBrowser/Wiki/wiki/Cinema-Mode" target="_blank">${ButtonLearnMore}</a></div>
</div>
</div>
<br />
<br />
<button type="submit" data-role="none" class="clearButton">
<paper-button raised class="submit block"><iron-icon icon="check"></iron-icon><span>${ButtonSave}</span></paper-button>
</button>
<p>${CinemaModeConfigurationHelp2}</p> <p>${CinemaModeConfigurationHelp2}</p>
<ul data-role="listview" class="ulForm">
<li>
<button type="submit" data-role="none" class="clearButton">
<paper-button raised class="submit block"><iron-icon icon="check"></iron-icon><span>${ButtonSave}</span></paper-button>
</button>
</li>
</ul>
</form> </form>
</div> </div>
</div> </div>

View file

@ -16,6 +16,7 @@
$('.chkEnableParentalControl', page).checked(config.EnableIntrosParentalControl); $('.chkEnableParentalControl', page).checked(config.EnableIntrosParentalControl);
$('#txtCustomIntrosPath', page).val(config.CustomIntroPath || ''); $('#txtCustomIntrosPath', page).val(config.CustomIntroPath || '');
$('#txtCodecIntrosPath', page).val(config.MediaInfoIntroPath || '');
$('#txtNumTrailers', page).val(config.TrailerLimit); $('#txtNumTrailers', page).val(config.TrailerLimit);
Dashboard.hideLoadingMsg(); Dashboard.hideLoadingMsg();
@ -31,6 +32,7 @@
ApiClient.getNamedConfiguration("cinemamode").then(function (config) { ApiClient.getNamedConfiguration("cinemamode").then(function (config) {
config.CustomIntroPath = $('#txtCustomIntrosPath', page).val(); config.CustomIntroPath = $('#txtCustomIntrosPath', page).val();
config.MediaInfoIntroPath = $('#txtCodecIntrosPath', page).val();
config.TrailerLimit = $('#txtNumTrailers', page).val(); config.TrailerLimit = $('#txtNumTrailers', page).val();
config.EnableIntrosForMovies = $('.chkMovies', page).checked(); 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); $('.cinemaModeConfigurationForm').off('submit', onSubmit).on('submit', onSubmit);
}).on('pageshow', "#cinemaModeConfigurationPage", function () { }).on('pageshow', "#cinemaModeConfigurationPage", function () {

View file

@ -1542,5 +1542,7 @@
"HeadersFolders": "Folders", "HeadersFolders": "Folders",
"LabelDisplayName": "Display name:", "LabelDisplayName": "Display name:",
"HeaderNewRecording": "New Recording", "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."
} }

View file

@ -957,5 +957,6 @@
"CoverArt": "Cover Art", "CoverArt": "Cover Art",
"ButtonOff": "Off", "ButtonOff": "Off",
"TitleHardwareAcceleration": "Hardware Acceleration", "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"
} }