|
|
|
|
@@ -202,7 +202,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div class="selectContainer">
|
|
|
|
|
<label class="selectLabel" for="PreferredVideoQuality">Preferred YouTube Quality</label>
|
|
|
|
|
<select is="emby-select" id="PreferredVideoQuality" name="PreferredVideoQuality" class="selectLayout emby-select-withcolor emby-select">
|
|
|
|
|
<select is="emby-select" id="PreferredVideoQuality" name="PreferredVideoQuality" class="selectLayout emby-select-withcolor emby-select" style="width: 100%; -webkit-appearance: menulist; appearance: menulist;">
|
|
|
|
|
<option value="Auto">Auto (Smart)</option>
|
|
|
|
|
<option value="Maximum">Maximum (4K+)</option>
|
|
|
|
|
<option value="1080p">1080p</option>
|
|
|
|
|
@@ -304,7 +304,7 @@
|
|
|
|
|
<h2 class="sectionTitle">Content Sorting</h2>
|
|
|
|
|
<div class="selectContainer">
|
|
|
|
|
<label class="selectLabel" for="SortBy">Sort By</label>
|
|
|
|
|
<select is="emby-select" id="SortBy" name="SortBy" class="selectLayout emby-select-withcolor emby-select">
|
|
|
|
|
<select is="emby-select" id="SortBy" name="SortBy" class="selectLayout emby-select-withcolor emby-select" style="width: 100%; -webkit-appearance: menulist; appearance: menulist;">
|
|
|
|
|
<option value="Random">Random</option>
|
|
|
|
|
<option value="Original">Original (Custom List Order)</option>
|
|
|
|
|
<option value="PremiereDate">Premiere Date</option>
|
|
|
|
|
@@ -318,7 +318,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div class="selectContainer">
|
|
|
|
|
<label class="selectLabel" for="SortOrder">Sort Order</label>
|
|
|
|
|
<select is="emby-select" id="SortOrder" name="SortOrder" class="selectLayout emby-select-withcolor emby-select">
|
|
|
|
|
<select is="emby-select" id="SortOrder" name="SortOrder" class="selectLayout emby-select-withcolor emby-select" style="width: 100%; -webkit-appearance: menulist; appearance: menulist;">
|
|
|
|
|
<option value="Ascending">Ascending</option>
|
|
|
|
|
<option value="Descending">Descending</option>
|
|
|
|
|
</select>
|
|
|
|
|
@@ -534,23 +534,24 @@
|
|
|
|
|
var container = page.querySelector('#seasonalSectionsList');
|
|
|
|
|
if (!container) return;
|
|
|
|
|
container.innerHTML = '';
|
|
|
|
|
sections.forEach(function(section) {
|
|
|
|
|
MediaBarEnhancedConfigurationPage.createSectionElement(container, section);
|
|
|
|
|
sections.forEach(function(section, index) {
|
|
|
|
|
MediaBarEnhancedConfigurationPage.createSectionElement(container, section, index + 1);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
addSeasonalSection: function(page) {
|
|
|
|
|
var container = page.querySelector('#seasonalSectionsList');
|
|
|
|
|
if (!container) return;
|
|
|
|
|
var index = container.children.length + 1;
|
|
|
|
|
MediaBarEnhancedConfigurationPage.createSectionElement(container, {
|
|
|
|
|
Name: 'New Season',
|
|
|
|
|
StartDay: 1, StartMonth: 1,
|
|
|
|
|
EndDay: 1, EndMonth: 1,
|
|
|
|
|
MediaIds: ''
|
|
|
|
|
});
|
|
|
|
|
}, index);
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
createSectionElement: function(container, data) {
|
|
|
|
|
createSectionElement: function(container, data, index) {
|
|
|
|
|
var div = document.createElement('div');
|
|
|
|
|
div.className = 'seasonal-section';
|
|
|
|
|
div.style.cssText = 'background: rgba(0,0,0,0.2); padding: 1em; margin-bottom: 1em; border-radius: 4px; border: 1px solid rgba(255,255,255,0.1);';
|
|
|
|
|
@@ -564,7 +565,7 @@
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
function mkSelect(val, opts, cls) {
|
|
|
|
|
var h = '<select class="emby-select emby-select-withcolor ' + cls + '" style="width: auto; display: inline-block; margin-right: 5px;">';
|
|
|
|
|
var h = '<select class="emby-select emby-select-withcolor ' + cls + '" style="width: auto; display: inline-block; margin-right: 5px; -webkit-appearance: menulist; appearance: menulist;">';
|
|
|
|
|
opts.forEach(function(o) {
|
|
|
|
|
var v = o.v || o;
|
|
|
|
|
var n = o.n || o;
|
|
|
|
|
@@ -574,16 +575,22 @@
|
|
|
|
|
return h;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
div.innerHTML = '<div style="display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.5em;">' +
|
|
|
|
|
' <div style="flex-grow:1; margin-right:1em;">' +
|
|
|
|
|
' <input is="emby-input" type="text" class="emby-input section-name" value="' + (data.Name || '') + '" label="Season Name" />' +
|
|
|
|
|
' <div class="fieldDescription">Name of the season (e.g. Christmas).</div>' +
|
|
|
|
|
var labelText = 'Season list #' + (index || 1);
|
|
|
|
|
|
|
|
|
|
div.innerHTML =
|
|
|
|
|
'<div class="inputContainer" style="margin-bottom: 0.5em;">' +
|
|
|
|
|
' <label class="inputLabel" style="margin-bottom:0.5em; display:block;">' + labelText + '</label>' +
|
|
|
|
|
' <div style="display: flex; align-items: center;">' +
|
|
|
|
|
' <div style="flex-grow:1;">' +
|
|
|
|
|
' <input is="emby-input" type="text" class="emby-input section-name" value="' + (data.Name || '') + '" />' +
|
|
|
|
|
' </div>' +
|
|
|
|
|
' <button type="button" class="raised emby-button remove-section" style="background: #a94442; min-width: unset; margin-left: 1em;">Remove</button>' +
|
|
|
|
|
' </div>' +
|
|
|
|
|
' <button type="button" class="raised emby-button remove-section" style="background: #a94442; min-width: unset; margin-top: 0.5em;">Remove</button>' +
|
|
|
|
|
' <div class="fieldDescription">Name of the season</div>' +
|
|
|
|
|
'</div>' +
|
|
|
|
|
'<div style="margin-bottom: 1em;">' +
|
|
|
|
|
'<div class="inputContainer" style="margin-bottom: 1em;">' +
|
|
|
|
|
' <label class="inputLabel" style="margin-bottom:0.5em; display:block;">Active Period</label>' +
|
|
|
|
|
' <div style="display: flex; align-items: center; flex-wrap: wrap; gap: 0.5em;">' +
|
|
|
|
|
' <div style="display: flex; align-items: center; flex-wrap: wrap; gap: 0.5em; padding-left: 0.2em;">' +
|
|
|
|
|
' <span>From:</span>' +
|
|
|
|
|
mkSelect(data.StartDay, days, 'start-day') +
|
|
|
|
|
mkSelect(data.StartMonth, months, 'start-month') +
|
|
|
|
|
@@ -593,7 +600,7 @@
|
|
|
|
|
' </div>' +
|
|
|
|
|
' <div class="fieldDescription">Date range (inclusive) when this content is active.</div>' +
|
|
|
|
|
'</div>' +
|
|
|
|
|
'<div>' +
|
|
|
|
|
'<div class="inputContainer">' +
|
|
|
|
|
' <label class="inputLabel" style="margin-bottom:0.5em; display:block;">Media IDs</label>' +
|
|
|
|
|
' <textarea is="emby-textarea" class="emby-textarea section-ids" style="width: 100%; height: 80px; font-family: monospace;">' + (data.MediaIds || '') + '</textarea>' +
|
|
|
|
|
' <div class="fieldDescription">Comma-separated list of Movie/Series/Collection IDs to show during this season.</div>' +
|
|
|
|
|
|