Compare commits
28 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4270235c78 | ||
|
|
76d8a67914 | ||
|
|
1a3caf5da6 | ||
|
|
3b3ef77e61 | ||
|
|
ba580b1b52 | ||
|
|
0a6284c716 | ||
|
|
f83e863664 | ||
|
|
747e8ed6bc | ||
|
|
30845442b2 | ||
|
|
bb83201736 | ||
|
|
457ae404ba | ||
|
|
b6d679f6ef | ||
|
|
3b88a1809d | ||
|
|
4614ce4a7a | ||
|
|
57840bb149 | ||
|
|
dd90a4630a | ||
|
|
b5d5e5706e | ||
|
|
a4b5cf5b6b | ||
|
|
353bda10df | ||
|
|
0e1b91d93c | ||
|
|
9363008d07 | ||
|
|
faec7d8941 | ||
|
|
7cc70854c4 | ||
|
|
9432f7aa86 | ||
|
|
4f7243bc74 | ||
|
|
ee724fedc8 | ||
|
|
a1dbd4eb12 | ||
|
|
236d8d9e70 |
@@ -27,6 +27,7 @@ public class PluginConfiguration : BasePluginConfiguration
|
|||||||
Christmas = new ChristmasOptions();
|
Christmas = new ChristmasOptions();
|
||||||
Santa = new SantaOptions();
|
Santa = new SantaOptions();
|
||||||
Easter = new EasterOptions();
|
Easter = new EasterOptions();
|
||||||
|
Resurrection = new ResurrectionOptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -67,6 +68,7 @@ public class PluginConfiguration : BasePluginConfiguration
|
|||||||
public ChristmasOptions Christmas { get; set; }
|
public ChristmasOptions Christmas { get; set; }
|
||||||
public SantaOptions Santa { get; set; }
|
public SantaOptions Santa { get; set; }
|
||||||
public EasterOptions Easter { get; set; }
|
public EasterOptions Easter { get; set; }
|
||||||
|
public ResurrectionOptions Resurrection { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class AutumnOptions
|
public class AutumnOptions
|
||||||
@@ -171,3 +173,12 @@ public class EasterOptions
|
|||||||
public int MinBunnyRestTime { get; set; } = 2000;
|
public int MinBunnyRestTime { get; set; } = 2000;
|
||||||
public int MaxBunnyRestTime { get; set; } = 5000;
|
public int MaxBunnyRestTime { get; set; } = 5000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class ResurrectionOptions
|
||||||
|
{
|
||||||
|
public int SymbolCount { get; set; } = 12;
|
||||||
|
public bool EnableResurrection { get; set; } = true;
|
||||||
|
public bool EnableRandomSymbols { get; set; } = true;
|
||||||
|
public bool EnableRandomSymbolsMobile { get; set; } = false;
|
||||||
|
public bool EnableDifferentDuration { get; set; } = true;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -6,11 +6,6 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="SeasonalsConfigPage" data-role="page" class="page type-interior pluginConfigurationPage" data-require="emby-input,emby-button,emby-select,emby-checkbox">
|
<div id="SeasonalsConfigPage" data-role="page" class="page type-interior pluginConfigurationPage" data-require="emby-input,emby-button,emby-select,emby-checkbox">
|
||||||
<!-- <style>
|
|
||||||
select option:disabled {
|
|
||||||
color: #a3a3a3 !important;
|
|
||||||
}
|
|
||||||
</style> -->
|
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<div class="content-primary">
|
<div class="content-primary">
|
||||||
<div class="sectionTitleContainer">
|
<div class="sectionTitleContainer">
|
||||||
@@ -24,40 +19,41 @@
|
|||||||
<hr style="max-width: 800px; margin: 1em 0;">
|
<hr style="max-width: 800px; margin: 1em 0;">
|
||||||
|
|
||||||
<div style="margin-bottom: 1.5em;">
|
<div style="margin-bottom: 1.5em;">
|
||||||
<button class="jellyfin-tab-button active" onclick="showTab('basic', this)"
|
<button class="seasonals-tab-button active" onclick="showSeasonalsTab('seasonals-basic', this)"
|
||||||
style="background: none; border: none; color: #fff; cursor: pointer; transition: color 0.3s, border-bottom 0.3s; padding: 0.5em 1em; border-bottom: 2px solid #00a4dc;">
|
style="background: none; border: none; color: #fff; cursor: pointer; transition: color 0.3s, border-bottom 0.3s; padding: 0.5em 1em; border-bottom: 2px solid #00a4dc;">
|
||||||
<h3>General</h3>
|
<h3>General Settings</h3>
|
||||||
</button>
|
</button>
|
||||||
<button class="jellyfin-tab-button" onclick="showTab('auto-selection', this)"
|
<button class="seasonals-tab-button" onclick="showSeasonalsTab('seasonals-auto-selection', this)"
|
||||||
style="background: none; border: none; color: #ccc; cursor: pointer; transition: color 0.3s, border-bottom 0.3s; padding: 0.5em 1em; border-bottom: 2px solid transparent;">
|
style="background: none; border: none; color: #ccc; cursor: pointer; transition: color 0.3s, border-bottom 0.3s; padding: 0.5em 1em; border-bottom: 2px solid transparent;">
|
||||||
<h3>Auto Selection</h3>
|
<h3>Auto Selection</h3>
|
||||||
</button>
|
</button>
|
||||||
<button class="jellyfin-tab-button" onclick="showTab('advanced', this)"
|
<button class="seasonals-tab-button" onclick="showSeasonalsTab('seasonals-advanced', this)"
|
||||||
style="background: none; border: none; color: #ccc; cursor: pointer; transition: color 0.3s, border-bottom 0.3s; padding: 0.5em 1em; border-bottom: 2px solid transparent;">
|
style="background: none; border: none; color: #ccc; cursor: pointer; transition: color 0.3s, border-bottom 0.3s; padding: 0.5em 1em; border-bottom: 2px solid transparent;">
|
||||||
<h3>Advanced Settings</h3>
|
<h3>Advanced Settings</h3>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form id="SeasonalsConfigForm">
|
<form id="SeasonalsConfigForm">
|
||||||
<!-- General Tab -->
|
<!-- BASIC Tab -->
|
||||||
<div id="tab-general" class="tab-content" style="display: block;">
|
<div id="seasonals-basic" class="seasonals-tab-content">
|
||||||
|
<h2 class="sectionTitle">Main Plugin Settings</h2>
|
||||||
<div class="checkboxContainer checkboxContainer-withDescription">
|
<div class="checkboxContainer checkboxContainer-withDescription">
|
||||||
<label class="emby-checkbox-label">
|
<label class="emby-checkbox-label">
|
||||||
<input id="IsEnabled" name="IsEnabled" type="checkbox" is="emby-checkbox" />
|
<input id="SeasonalsIsEnabled" name="SeasonalsIsEnabled" type="checkbox" is="emby-checkbox" />
|
||||||
<span>Enable Seasonals</span>
|
<span>Enable Seasonals</span>
|
||||||
</label>
|
</label>
|
||||||
<div class="fieldDescription">Enable or disable the entire plugin functionality.</div>
|
<div class="fieldDescription">Enable or disable the entire plugin functionality.</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="checkboxContainer checkboxContainer-withDescription">
|
<div class="checkboxContainer checkboxContainer-withDescription">
|
||||||
<label class="emby-checkbox-label">
|
<label class="emby-checkbox-label">
|
||||||
<input id="AutomateSeasonSelection" name="AutomateSeasonSelection" type="checkbox" is="emby-checkbox" />
|
<input id="SeasonalsAutomateSeasonSelection" name="SeasonalsAutomateSeasonSelection" type="checkbox" is="emby-checkbox" />
|
||||||
<span>Automate Season Selection</span>
|
<span>Automate Season Selection</span>
|
||||||
</label>
|
</label>
|
||||||
<div class="fieldDescription">If enabled, the plugin will use the rules defined in the "Auto Selection" tab to assume the season. If no rule matches, it falls back to the "Standard Season" below.</div>
|
<div class="fieldDescription">If enabled, the plugin will use the rules defined in the "Auto Selection" tab to assume the season. If no rule matches, it falls back to the "Standard Season" below.</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="selectContainer">
|
<div class="selectContainer">
|
||||||
<label class="selectLabel" for="SelectedSeason">Standard Season</label>
|
<label class="selectLabel" for="SeasonalsSelectedSeason">Standard Season</label>
|
||||||
<select is="emby-select" id="SelectedSeason" name="SelectedSeason" class="selectLayout emby-select-withcolor emby-select" style="width: 100%; -webkit-appearance: menulist; appearance: menulist;">
|
<select is="emby-select" id="SeasonalsSelectedSeason" name="SeasonalsSelectedSeason" class="selectLayout emby-select-withcolor emby-select" style="width: 100%; -webkit-appearance: menulist; appearance: menulist;">
|
||||||
<option value="none">None</option>
|
<option value="none">None</option>
|
||||||
<option value="snowflakes">Snowflakes</option>
|
<option value="snowflakes">Snowflakes</option>
|
||||||
<option value="snowfall">Snowfall</option>
|
<option value="snowfall">Snowfall</option>
|
||||||
@@ -83,7 +79,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="checkboxContainer checkboxContainer-withDescription">
|
<div class="checkboxContainer checkboxContainer-withDescription">
|
||||||
<label class="emby-checkbox-label">
|
<label class="emby-checkbox-label">
|
||||||
<input id="EnableClientSideToggle" name="EnableClientSideToggle" type="checkbox" is="emby-checkbox" />
|
<input id="SeasonalsEnableClientSideToggle" name="SeasonalsEnableClientSideToggle" type="checkbox" is="emby-checkbox" />
|
||||||
<span>Allow Client-Side Toggle</span>
|
<span>Allow Client-Side Toggle</span>
|
||||||
</label>
|
</label>
|
||||||
<div class="fieldDescription">If enabled, users will see a seasonals icon in the header to toggle seasonals for their browser (device-specific).</div>
|
<div class="fieldDescription">If enabled, users will see a seasonals icon in the header to toggle seasonals for their browser (device-specific).</div>
|
||||||
@@ -91,27 +87,31 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Auto Selection Tab -->
|
<!-- Auto Selection Tab -->
|
||||||
<div id="tab-auto-selection" class="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;">
|
<h2>Auto Selection Rules</h2>
|
||||||
<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">
|
||||||
<!-- Rules will be injected here via JS -->
|
<!-- Rules will be injected here via JS -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button is="emby-button" type="button" class="raised block" onclick="SeasonalsConfigPage.addRule()">
|
<button is="emby-button" type="button" class="raised emby-button" onclick="SeasonalsConfigPage.addRule();"
|
||||||
<i class="md-icon button-icon button-icon-left">add</i>
|
style="margin-top: 1em; display: inline-flex; align-items: center; gap: 0.4em;">
|
||||||
|
<i class="material-icons" style="font-size: 24px;">add</i>
|
||||||
<span>Add Rule</span>
|
<span>Add Rule</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Advanced Tab -->
|
<!-- Advanced Tab -->
|
||||||
<div id="tab-advanced" class="tab-content" style="display: none;">
|
<div id="seasonals-advanced" class="seasonals-tab-content" style="display: none;">
|
||||||
<p>Configure specific settings for each seasonal theme below.</p>
|
<h2 class="sectionTitle">Configure specific settings for each seasonal theme</h2>
|
||||||
<p>All symbol count settings add this number in addition to the standard 12 symbols (if additional symbols is enabled).</p>
|
<!-- <p>Configure specific settings for each seasonal theme below.</p> -->
|
||||||
<details>
|
<p>All symbol count settings add this number in addition to the standard 12 symbols (if additional symbols is enabled).</p>
|
||||||
|
<details>
|
||||||
<summary>Autumn</summary>
|
<summary>Autumn</summary>
|
||||||
<div class="checkboxContainer checkboxContainer-withDescription">
|
<div class="checkboxContainer checkboxContainer-withDescription">
|
||||||
<label class="emby-checkbox-label">
|
<label class="emby-checkbox-label">
|
||||||
@@ -538,6 +538,44 @@
|
|||||||
<div class="fieldDescription">Maximum time the bunny waits before appearing again.</div>
|
<div class="fieldDescription">Maximum time the bunny waits before appearing again.</div>
|
||||||
</div>
|
</div>
|
||||||
</details>
|
</details>
|
||||||
|
<hr style="max-width: 800px; margin: 1em 0;">
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Resurrection</summary>
|
||||||
|
<div class="checkboxContainer checkboxContainer-withDescription">
|
||||||
|
<label class="emby-checkbox-label">
|
||||||
|
<input id="EnableResurrection" name="EnableResurrection" type="checkbox" is="emby-checkbox" />
|
||||||
|
<span>Enable Resurrection Seasonal</span>
|
||||||
|
</label>
|
||||||
|
<div class="fieldDescription">Enable the Resurrection theme in general (e.g. for automation).</div>
|
||||||
|
</div>
|
||||||
|
<div class="checkboxContainer checkboxContainer-withDescription">
|
||||||
|
<label class="emby-checkbox-label">
|
||||||
|
<input id="EnableRandomResurrection" name="EnableRandomResurrection" type="checkbox" is="emby-checkbox" />
|
||||||
|
<span>Enable Additional Random Symbols</span>
|
||||||
|
</label>
|
||||||
|
<div class="fieldDescription">Displays additional symbols randomly distributed across the screen.</div>
|
||||||
|
</div>
|
||||||
|
<div class="checkboxContainer checkboxContainer-withDescription">
|
||||||
|
<label class="emby-checkbox-label">
|
||||||
|
<input id="EnableRandomResurrectionMobile" name="EnableRandomResurrectionMobile" type="checkbox" is="emby-checkbox" />
|
||||||
|
<span>Enable Additional Random Symbols on Mobile</span>
|
||||||
|
</label>
|
||||||
|
<div class="fieldDescription">Displays additional symbols randomly distributed across the screen on mobile devices. Warning: High values may affect performance.</div>
|
||||||
|
</div>
|
||||||
|
<div class="inputContainer">
|
||||||
|
<label class="inputLabel" for="ResurrectionSymbolCount">Symbol Count</label>
|
||||||
|
<input is="emby-input" type="number" id="ResurrectionSymbolCount" name="ResurrectionSymbolCount" />
|
||||||
|
<div class="fieldDescription">Number of additional symbols (if enabled).</div>
|
||||||
|
</div>
|
||||||
|
<div class="checkboxContainer checkboxContainer-withDescription">
|
||||||
|
<label class="emby-checkbox-label">
|
||||||
|
<input id="EnableDifferentDurationResurrection" name="EnableDifferentDurationResurrection" type="checkbox" is="emby-checkbox" />
|
||||||
|
<span>Enable Different Duration</span>
|
||||||
|
</label>
|
||||||
|
<div class="fieldDescription">Randomize the movement speed.</div>
|
||||||
|
</div>
|
||||||
|
</details>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<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;">
|
<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;">
|
||||||
@@ -578,7 +616,7 @@
|
|||||||
}
|
}
|
||||||
.seasonal-rule-content {
|
.seasonal-rule-content {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 2fr 1fr 1fr 2fr;
|
grid-template-columns: 2fr 1.3fr 1.3fr 2fr;
|
||||||
gap: 15px;
|
gap: 15px;
|
||||||
align-items: end;
|
align-items: end;
|
||||||
}
|
}
|
||||||
@@ -589,8 +627,14 @@
|
|||||||
.date-range-group {
|
.date-range-group {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
align-items: center;
|
align-items: flex-end;
|
||||||
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
.date-range-group > .inputContainer,
|
||||||
|
.date-range-group > .selectContainer {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
@media (max-width: 800px) {
|
@media (max-width: 800px) {
|
||||||
.seasonal-rule-content {
|
.seasonal-rule-content {
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
@@ -598,17 +642,22 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Styles for the Tabs */
|
/* Styles for the Tabs */
|
||||||
.jellyfin-tab-button.active {
|
.seasonals-tab-button.active {
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
border-bottom: 2px solid #00a4dc !important;
|
border-bottom: 2px solid #00a4dc !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Disabled options in selects */
|
||||||
|
select option:disabled {
|
||||||
|
color: #a3a3a3 !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
function showTab(tabId, btn) {
|
function showSeasonalsTab(tabId, btn) {
|
||||||
document.querySelectorAll('.tab-content').forEach(el => el.style.display = 'none');
|
document.querySelectorAll('.seasonals-tab-content').forEach(el => el.style.display = 'none');
|
||||||
document.getElementById(tabId).style.display = 'block';
|
document.getElementById(tabId).style.display = 'block';
|
||||||
|
|
||||||
document.querySelectorAll('.jellyfin-tab-button').forEach(b => {
|
document.querySelectorAll('.seasonals-tab-button').forEach(b => {
|
||||||
b.classList.remove('active');
|
b.classList.remove('active');
|
||||||
b.style.color = '#ccc';
|
b.style.color = '#ccc';
|
||||||
b.style.borderBottom = '2px solid transparent';
|
b.style.borderBottom = '2px solid transparent';
|
||||||
@@ -624,21 +673,54 @@
|
|||||||
var SeasonalsConfigPage = {
|
var SeasonalsConfigPage = {
|
||||||
pluginUniqueId: 'ef1e863f-cbb0-4e47-9f23-f0cbb1826ad4',
|
pluginUniqueId: 'ef1e863f-cbb0-4e47-9f23-f0cbb1826ad4',
|
||||||
|
|
||||||
|
getDaysOptions: function(selectedDay) {
|
||||||
|
var options = '';
|
||||||
|
for (var i = 1; i <= 31; i++) {
|
||||||
|
var isSelected = i === selectedDay ? 'selected' : '';
|
||||||
|
options += '<option value="' + i + '" ' + isSelected + '>' + i + '</option>';
|
||||||
|
}
|
||||||
|
return options;
|
||||||
|
},
|
||||||
|
|
||||||
|
getMonthsOptions: function(selectedMonth) {
|
||||||
|
var months = [
|
||||||
|
{ val: 1, name: 'Jan' },
|
||||||
|
{ val: 2, name: 'Feb' },
|
||||||
|
{ val: 3, name: 'Mar' },
|
||||||
|
{ val: 4, name: 'Apr' },
|
||||||
|
{ val: 5, name: 'May' },
|
||||||
|
{ val: 6, name: 'Jun' },
|
||||||
|
{ val: 7, name: 'Jul' },
|
||||||
|
{ val: 8, name: 'Aug' },
|
||||||
|
{ val: 9, name: 'Sep' },
|
||||||
|
{ val: 10, name: 'Oct' },
|
||||||
|
{ val: 11, name: 'Nov' },
|
||||||
|
{ val: 12, name: 'Dec' }
|
||||||
|
];
|
||||||
|
var options = '';
|
||||||
|
for (var i = 0; i < months.length; i++) {
|
||||||
|
var m = months[i];
|
||||||
|
var isSelected = m.val === selectedMonth ? 'selected' : '';
|
||||||
|
options += '<option value="' + m.val + '" ' + isSelected + '>' + m.name + '</option>';
|
||||||
|
}
|
||||||
|
return options;
|
||||||
|
},
|
||||||
|
|
||||||
addRule: function(data = null) {
|
addRule: function(data = null) {
|
||||||
var container = document.querySelector('#seasonalRulesList');
|
var container = document.querySelector('#seasonalRulesList');
|
||||||
var div = document.createElement('div');
|
var div = document.createElement('div');
|
||||||
div.className = 'seasonal-rule';
|
div.className = 'seasonal-rule';
|
||||||
|
|
||||||
var name = data ? data.Name : 'New Rule';
|
var name = data ? (data.Name || data.name || 'New Rule') : 'New Rule';
|
||||||
var startDay = data ? data.StartDay : 1;
|
var startDay = data ? (data.StartDay !== undefined ? data.StartDay : (data.startDay !== undefined ? data.startDay : 1)) : 1;
|
||||||
var startMonth = data ? data.StartMonth : 1;
|
var startMonth = data ? (data.StartMonth !== undefined ? data.StartMonth : (data.startMonth !== undefined ? data.startMonth : 1)) : 1;
|
||||||
var endDay = data ? data.EndDay : 1;
|
var endDay = data ? (data.EndDay !== undefined ? data.EndDay : (data.endDay !== undefined ? data.endDay : 1)) : 1;
|
||||||
var endMonth = data ? data.EndMonth : 1;
|
var endMonth = data ? (data.EndMonth !== undefined ? data.EndMonth : (data.endMonth !== undefined ? data.endMonth : 1)) : 1;
|
||||||
var theme = data ? data.Theme : 'snowflakes';
|
var theme = data ? (data.Theme || data.theme || 'none') : 'none';
|
||||||
|
|
||||||
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>
|
||||||
@@ -648,44 +730,53 @@
|
|||||||
<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" value="${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="selectContainer" style="margin:0; flex: 1;">
|
||||||
<label class="inputLabel">Start Day</label>
|
<label class="selectLabel">Start Day</label>
|
||||||
<input is="emby-input" type="number" class="rule-start-day" value="${startDay}" min="1" max="31" />
|
<select is="emby-select" class="rule-start-day" style="width: 100%;">
|
||||||
|
${this.getDaysOptions(startDay)}
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputContainer" style="margin:0;">
|
<div class="selectContainer" style="margin:0; flex: 1;">
|
||||||
<label class="inputLabel">Month</label>
|
<label class="selectLabel">Month</label>
|
||||||
<input is="emby-input" type="number" class="rule-start-month" value="${startMonth}" min="1" max="12" />
|
<select is="emby-select" class="rule-start-month" style="width: 100%;">
|
||||||
|
${this.getMonthsOptions(startMonth)}
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="date-range-group">
|
<div class="date-range-group">
|
||||||
<div class="inputContainer" style="margin:0;">
|
<div class="selectContainer" style="margin:0; flex: 1;">
|
||||||
<label class="inputLabel">End Day</label>
|
<label class="selectLabel">End Day</label>
|
||||||
<input is="emby-input" type="number" class="rule-end-day" value="${endDay}" min="1" max="31" />
|
<select is="emby-select" class="rule-end-day" style="width: 100%;">
|
||||||
|
${this.getDaysOptions(endDay)}
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputContainer" style="margin:0;">
|
<div class="selectContainer" style="margin:0; flex: 1;">
|
||||||
<label class="inputLabel">Month</label>
|
<label class="selectLabel">Month</label>
|
||||||
<input is="emby-input" type="number" class="rule-end-month" value="${endMonth}" min="1" max="12" />
|
<select is="emby-select" class="rule-end-month" style="width: 100%;">
|
||||||
|
${this.getMonthsOptions(endMonth)}
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="selectContainer" style="margin:0;">
|
<div class="selectContainer" style="margin:0;">
|
||||||
<label class="selectLabel">Theme</label>
|
<label class="selectLabel">Theme</label>
|
||||||
<select is="emby-select" class="rule-theme" style="width: 100%;">
|
<select is="emby-select" class="rule-theme" style="width: 100%;">
|
||||||
<option value="none" ${theme === 'none' ? 'selected' : ''}>None</option>
|
<option value="none">None</option>
|
||||||
<option value="snowflakes" ${theme === 'snowflakes' ? 'selected' : ''}>Snowflakes</option>
|
<option value="snowflakes">Snowflakes</option>
|
||||||
<option value="snowfall" ${theme === 'snowfall' ? 'selected' : ''}>Snowfall</option>
|
<option value="snowfall">Snowfall</option>
|
||||||
<option value="snowstorm" ${theme === 'snowstorm' ? 'selected' : ''}>Snowstorm</option>
|
<option value="snowstorm">Snowstorm</option>
|
||||||
<option value="fireworks" ${theme === 'fireworks' ? 'selected' : ''}>Fireworks</option>
|
<option value="fireworks">Fireworks</option>
|
||||||
<option value="halloween" ${theme === 'halloween' ? 'selected' : ''}>Halloween</option>
|
<option value="halloween">Halloween</option>
|
||||||
<option value="hearts" ${theme === 'hearts' ? 'selected' : ''}>Hearts</option>
|
<option value="hearts">Hearts</option>
|
||||||
<option value="christmas" ${theme === 'christmas' ? 'selected' : ''}>Christmas</option>
|
<option value="christmas">Christmas</option>
|
||||||
<option value="santa" ${theme === 'santa' ? 'selected' : ''}>Santa</option>
|
<option value="santa">Santa</option>
|
||||||
<option value="autumn" ${theme === 'autumn' ? 'selected' : ''}>Autumn</option>
|
<option value="autumn">Autumn</option>
|
||||||
<option value="easter" ${theme === 'easter' ? 'selected' : ''}>Easter</option>
|
<option value="easter">Easter</option>
|
||||||
|
<option value="resurrection">Resurrection</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -693,20 +784,41 @@
|
|||||||
|
|
||||||
container.appendChild(div);
|
container.appendChild(div);
|
||||||
|
|
||||||
|
// Set values programmatically
|
||||||
|
div.querySelector('.rule-name').value = name;
|
||||||
|
div.querySelector('.rule-start-day').value = startDay;
|
||||||
|
div.querySelector('.rule-start-month').value = startMonth;
|
||||||
|
div.querySelector('.rule-end-day').value = endDay;
|
||||||
|
div.querySelector('.rule-end-month').value = endMonth;
|
||||||
|
div.querySelector('.rule-theme').value = theme;
|
||||||
|
|
||||||
// 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) {
|
||||||
@@ -737,10 +849,10 @@
|
|||||||
.addEventListener('pageshow', function() {
|
.addEventListener('pageshow', function() {
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
ApiClient.getPluginConfiguration(SeasonalsConfigPage.pluginUniqueId).then(function (config) {
|
ApiClient.getPluginConfiguration(SeasonalsConfigPage.pluginUniqueId).then(function (config) {
|
||||||
document.querySelector('#IsEnabled').checked = config.IsEnabled;
|
document.querySelector('#SeasonalsIsEnabled').checked = config.IsEnabled;
|
||||||
document.querySelector('#SelectedSeason').value = config.SelectedSeason;
|
document.querySelector('#SeasonalsSelectedSeason').value = config.SelectedSeason;
|
||||||
document.querySelector('#AutomateSeasonSelection').checked = config.AutomateSeasonSelection;
|
document.querySelector('#SeasonalsAutomateSeasonSelection').checked = config.AutomateSeasonSelection;
|
||||||
document.querySelector('#EnableClientSideToggle').checked = config.EnableClientSideToggle !== undefined ? config.EnableClientSideToggle : true;
|
document.querySelector('#SeasonalsEnableClientSideToggle').checked = config.EnableClientSideToggle !== undefined ? config.EnableClientSideToggle : true;
|
||||||
|
|
||||||
// Load Rules
|
// Load Rules
|
||||||
try {
|
try {
|
||||||
@@ -835,6 +947,13 @@
|
|||||||
document.querySelector('#MinBunnyRestTime').value = config.Easter.MinBunnyRestTime;
|
document.querySelector('#MinBunnyRestTime').value = config.Easter.MinBunnyRestTime;
|
||||||
document.querySelector('#MaxBunnyRestTime').value = config.Easter.MaxBunnyRestTime;
|
document.querySelector('#MaxBunnyRestTime').value = config.Easter.MaxBunnyRestTime;
|
||||||
|
|
||||||
|
// Resurrection
|
||||||
|
document.querySelector('#EnableResurrection').checked = config.Resurrection.EnableResurrection;
|
||||||
|
document.querySelector('#ResurrectionSymbolCount').value = config.Resurrection.SymbolCount;
|
||||||
|
document.querySelector('#EnableRandomResurrection').checked = config.Resurrection.EnableRandomSymbols;
|
||||||
|
document.querySelector('#EnableRandomResurrectionMobile').checked = config.Resurrection.EnableRandomSymbolsMobile;
|
||||||
|
document.querySelector('#EnableDifferentDurationResurrection').checked = config.Resurrection.EnableDifferentDuration;
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -843,10 +962,10 @@
|
|||||||
.addEventListener('submit', function(e) {
|
.addEventListener('submit', function(e) {
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
ApiClient.getPluginConfiguration(SeasonalsConfigPage.pluginUniqueId).then(function (config) {
|
ApiClient.getPluginConfiguration(SeasonalsConfigPage.pluginUniqueId).then(function (config) {
|
||||||
config.IsEnabled = document.querySelector('#IsEnabled').checked;
|
config.IsEnabled = document.querySelector('#SeasonalsIsEnabled').checked;
|
||||||
config.SelectedSeason = document.querySelector('#SelectedSeason').value;
|
config.SelectedSeason = document.querySelector('#SeasonalsSelectedSeason').value;
|
||||||
config.AutomateSeasonSelection = document.querySelector('#AutomateSeasonSelection').checked;
|
config.AutomateSeasonSelection = document.querySelector('#SeasonalsAutomateSeasonSelection').checked;
|
||||||
config.EnableClientSideToggle = document.querySelector('#EnableClientSideToggle').checked;
|
config.EnableClientSideToggle = document.querySelector('#SeasonalsEnableClientSideToggle').checked;
|
||||||
|
|
||||||
// Save Rules
|
// Save Rules
|
||||||
config.SeasonalRules = JSON.stringify(SeasonalsConfigPage.getRulesFromUI());
|
config.SeasonalRules = JSON.stringify(SeasonalsConfigPage.getRulesFromUI());
|
||||||
@@ -935,10 +1054,17 @@
|
|||||||
config.Easter.MinBunnyRestTime = parseInt(document.querySelector('#MinBunnyRestTime').value);
|
config.Easter.MinBunnyRestTime = parseInt(document.querySelector('#MinBunnyRestTime').value);
|
||||||
config.Easter.MaxBunnyRestTime = parseInt(document.querySelector('#MaxBunnyRestTime').value);
|
config.Easter.MaxBunnyRestTime = parseInt(document.querySelector('#MaxBunnyRestTime').value);
|
||||||
|
|
||||||
|
// Resurrection
|
||||||
|
config.Resurrection.EnableResurrection = document.querySelector('#EnableResurrection').checked;
|
||||||
|
config.Resurrection.SymbolCount = parseInt(document.querySelector('#ResurrectionSymbolCount').value);
|
||||||
|
config.Resurrection.EnableRandomSymbols = document.querySelector('#EnableRandomResurrection').checked;
|
||||||
|
config.Resurrection.EnableRandomSymbolsMobile = document.querySelector('#EnableRandomResurrectionMobile').checked;
|
||||||
|
config.Resurrection.EnableDifferentDuration = document.querySelector('#EnableDifferentDurationResurrection').checked;
|
||||||
|
|
||||||
ApiClient.updatePluginConfiguration(SeasonalsConfigPage.pluginUniqueId, config).then(function (result) {
|
ApiClient.updatePluginConfiguration(SeasonalsConfigPage.pluginUniqueId, config).then(function (result) {
|
||||||
Dashboard.processPluginConfigurationUpdateResult(result);
|
Dashboard.processPluginConfigurationUpdateResult(result);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -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.0</Version>
|
<Version>1.7.0.10</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.0",
|
"version": "1.7.0.10",
|
||||||
"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.0/Jellyfin.Plugin.Seasonals.zip",
|
"sourceUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/Jellyfin-Seasonals-Plugin/releases/download/v1.7.0.10/Jellyfin.Plugin.Seasonals.zip",
|
||||||
"checksum": "46c5fba0237ea0056d7f9a556e4a8a9a",
|
"checksum": "8ff32aad07b862b7b56aabad7ea0794b",
|
||||||
"timestamp": "2026-02-16T01:31:55Z"
|
"timestamp": "2026-02-16T22:02:52Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"version": "1.6.3.0",
|
"version": "1.6.3.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user