Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
747e8ed6bc | ||
|
|
30845442b2 | ||
|
|
bb83201736 | ||
|
|
457ae404ba | ||
|
|
b6d679f6ef | ||
|
|
3b88a1809d |
@@ -88,9 +88,11 @@
|
|||||||
|
|
||||||
<!-- Auto Selection Tab -->
|
<!-- Auto Selection Tab -->
|
||||||
<div id="seasonals-auto-selection" class="seasonals-tab-content" style="display: none;">
|
<div id="seasonals-auto-selection" class="seasonals-tab-content" style="display: none;">
|
||||||
<div style="background-color: rgba(255, 255, 255, 0.05); border-left: 4px solid #00a4dc; border-radius: 4px; padding: 1em 1.5em; margin-bottom: 1.5em;">
|
|
||||||
<h3>Auto Selection Rules</h3>
|
<h3>Auto Selection Rules</h3>
|
||||||
<p>Define rules to automatically select a season based on the date. Rules are evaluated from top to bottom. The first matching rule wins.</p>
|
|
||||||
|
<div style="background-color: rgba(255, 255, 255, 0.05); border-left: 4px solid #00a4dc; border-radius: 4px; padding: 1em 1.5em; margin: 1.5em 0; display: flex; align-items: center; gap: 1em;">
|
||||||
|
<i class="material-icons" style="color: #00a4dc; font-size: 24px;">info</i>
|
||||||
|
<div>Define rules to automatically select a season based on the date. Rules are evaluated from top to bottom. The first matching rule wins.</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="seasonalRulesList">
|
<div id="seasonalRulesList">
|
||||||
@@ -98,7 +100,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button is="emby-button" type="button" class="raised button-accent block" onclick="SeasonalsConfigPage.addRule();">
|
<button is="emby-button" type="button" class="raised button-accent block" onclick="SeasonalsConfigPage.addRule();">
|
||||||
<i class="material-icons button-icon button-icon-left">add</i>
|
<i class="material-icons" style="font-size: 24px;">add</i>
|
||||||
<span>Add Rule</span>
|
<span>Add Rule</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -613,8 +615,7 @@
|
|||||||
}
|
}
|
||||||
.seasonal-rule-content {
|
.seasonal-rule-content {
|
||||||
display: grid;
|
display: grid;
|
||||||
/* grid-template-columns: 2fr 1fr 1fr 2fr; */
|
grid-template-columns: 2fr 1.2fr 1.2fr 2fr;
|
||||||
grid-template-columns: 2fr 1.2fr 1.2fr 1.6fr;
|
|
||||||
gap: 15px;
|
gap: 15px;
|
||||||
align-items: end;
|
align-items: end;
|
||||||
}
|
}
|
||||||
@@ -626,7 +627,12 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
.date-range-group > .inputContainer {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
@media (max-width: 800px) {
|
@media (max-width: 800px) {
|
||||||
.seasonal-rule-content {
|
.seasonal-rule-content {
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
@@ -639,10 +645,10 @@
|
|||||||
border-bottom: 2px solid #00a4dc !important;
|
border-bottom: 2px solid #00a4dc !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Disabled options in selects
|
/* Disabled options in selects */
|
||||||
select option:disabled {
|
select option:disabled {
|
||||||
color: #a3a3a3 !important;
|
color: #a3a3a3 !important;
|
||||||
} */
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
function showSeasonalsTab(tabId, btn) {
|
function showSeasonalsTab(tabId, btn) {
|
||||||
@@ -679,7 +685,7 @@
|
|||||||
|
|
||||||
div.innerHTML = `
|
div.innerHTML = `
|
||||||
<div class="seasonal-rule-header">
|
<div class="seasonal-rule-header">
|
||||||
<div style="font-weight: bold; font-size: 1.1em;" class="rule-title">${name}</div>
|
<div style="font-weight: bold; font-size: 1.1em;" class="rule-title"></div>
|
||||||
<div class="rule-actions">
|
<div class="rule-actions">
|
||||||
<button type="button" is="paper-icon-button-light" class="btn-move-up" title="Move Up"><i class="material-icons">arrow_upward</i></button>
|
<button type="button" is="paper-icon-button-light" class="btn-move-up" title="Move Up"><i class="material-icons">arrow_upward</i></button>
|
||||||
<button type="button" is="paper-icon-button-light" class="btn-move-down" title="Move Down"><i class="material-icons">arrow_downward</i></button>
|
<button type="button" is="paper-icon-button-light" class="btn-move-down" title="Move Down"><i class="material-icons">arrow_downward</i></button>
|
||||||
@@ -689,7 +695,7 @@
|
|||||||
<div class="seasonal-rule-content">
|
<div class="seasonal-rule-content">
|
||||||
<div class="inputContainer" style="margin:0;">
|
<div class="inputContainer" style="margin:0;">
|
||||||
<label class="inputLabel">Name</label>
|
<label class="inputLabel">Name</label>
|
||||||
<input is="emby-input" class="rule-name" onchange="this.closest('.seasonal-rule').querySelector('.rule-title').innerText = this.value" />
|
<input is="emby-input" class="rule-name" onchange="SeasonalsConfigPage.updateRuleTitles();" />
|
||||||
</div>
|
</div>
|
||||||
<div class="date-range-group">
|
<div class="date-range-group">
|
||||||
<div class="inputContainer" style="margin:0;">
|
<div class="inputContainer" style="margin:0;">
|
||||||
@@ -727,6 +733,7 @@
|
|||||||
<option value="santa">Santa</option>
|
<option value="santa">Santa</option>
|
||||||
<option value="autumn">Autumn</option>
|
<option value="autumn">Autumn</option>
|
||||||
<option value="easter">Easter</option>
|
<option value="easter">Easter</option>
|
||||||
|
<option value="resurrection">Resurrection</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -734,9 +741,8 @@
|
|||||||
|
|
||||||
container.appendChild(div);
|
container.appendChild(div);
|
||||||
|
|
||||||
// Set values programmatically to ensure they are correctly populated
|
// Set values programmatically
|
||||||
div.querySelector('.rule-name').value = name;
|
div.querySelector('.rule-name').value = name;
|
||||||
div.querySelector('.rule-title').innerText = name;
|
|
||||||
div.querySelector('.rule-start-day').value = startDay;
|
div.querySelector('.rule-start-day').value = startDay;
|
||||||
div.querySelector('.rule-start-month').value = startMonth;
|
div.querySelector('.rule-start-month').value = startMonth;
|
||||||
div.querySelector('.rule-end-day').value = endDay;
|
div.querySelector('.rule-end-day').value = endDay;
|
||||||
@@ -746,17 +752,30 @@
|
|||||||
// Bind events
|
// Bind events
|
||||||
div.querySelector('.btn-remove').addEventListener('click', function() {
|
div.querySelector('.btn-remove').addEventListener('click', function() {
|
||||||
div.remove();
|
div.remove();
|
||||||
|
SeasonalsConfigPage.updateRuleTitles();
|
||||||
});
|
});
|
||||||
div.querySelector('.btn-move-up').addEventListener('click', function() {
|
div.querySelector('.btn-move-up').addEventListener('click', function() {
|
||||||
if (div.previousElementSibling) {
|
if (div.previousElementSibling) {
|
||||||
container.insertBefore(div, div.previousElementSibling);
|
container.insertBefore(div, div.previousElementSibling);
|
||||||
|
SeasonalsConfigPage.updateRuleTitles();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
div.querySelector('.btn-move-down').addEventListener('click', function() {
|
div.querySelector('.btn-move-down').addEventListener('click', function() {
|
||||||
if (div.nextElementSibling) {
|
if (div.nextElementSibling) {
|
||||||
container.insertBefore(div.nextElementSibling, div);
|
container.insertBefore(div.nextElementSibling, div);
|
||||||
|
SeasonalsConfigPage.updateRuleTitles();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.updateRuleTitles();
|
||||||
|
},
|
||||||
|
|
||||||
|
updateRuleTitles: function() {
|
||||||
|
var rules = document.querySelectorAll('.seasonal-rule');
|
||||||
|
rules.forEach((rule, index) => {
|
||||||
|
var name = rule.querySelector('.rule-name').value;
|
||||||
|
rule.querySelector('.rule-title').innerText = `#${index + 1} ${name}`;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
renderRules: function(rules) {
|
renderRules: function(rules) {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<!-- <TreatWarningsAsErrors>false</TreatWarningsAsErrors> -->
|
<!-- <TreatWarningsAsErrors>false</TreatWarningsAsErrors> -->
|
||||||
<Title>Jellyfin Seasonals Plugin</Title>
|
<Title>Jellyfin Seasonals Plugin</Title>
|
||||||
<Authors>CodeDevMLH</Authors>
|
<Authors>CodeDevMLH</Authors>
|
||||||
<Version>1.7.0.6</Version>
|
<Version>1.7.0.8</Version>
|
||||||
<RepositoryUrl>https://github.com/CodeDevMLH/Jellyfin-Seasonals</RepositoryUrl>
|
<RepositoryUrl>https://github.com/CodeDevMLH/Jellyfin-Seasonals</RepositoryUrl>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -9,12 +9,12 @@
|
|||||||
"imageUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/Jellyfin-Seasonals-Plugin/raw/branch/main/logo.png",
|
"imageUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/Jellyfin-Seasonals-Plugin/raw/branch/main/logo.png",
|
||||||
"versions": [
|
"versions": [
|
||||||
{
|
{
|
||||||
"version": "1.7.0.5",
|
"version": "1.7.0.8",
|
||||||
"changelog": "- feat: add customizable auto seasonal list via config page\n- feat: add new season theme 'resurrection' by Bioflash257",
|
"changelog": "- feat: add customizable auto seasonal list via config page\n- feat: add new season theme 'resurrection' by Bioflash257",
|
||||||
"targetAbi": "10.11.0.0",
|
"targetAbi": "10.11.0.0",
|
||||||
"sourceUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/Jellyfin-Seasonals-Plugin/releases/download/v1.7.0.5/Jellyfin.Plugin.Seasonals.zip",
|
"sourceUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/Jellyfin-Seasonals-Plugin/releases/download/v1.7.0.8/Jellyfin.Plugin.Seasonals.zip",
|
||||||
"checksum": "dc018048e121b88469b8d8340970b2a6",
|
"checksum": "b4593438e6c017f5c0282ee92c812fcd",
|
||||||
"timestamp": "2026-02-16T17:16:02Z"
|
"timestamp": "2026-02-16T18:01:43Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"version": "1.6.3.0",
|
"version": "1.6.3.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user