Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1428db3e1e | ||
|
|
1f5f436e44 | ||
|
|
46f5c3648d | ||
|
|
555e2ab8be | ||
|
|
26eadfc0aa | ||
|
|
142f538939 | ||
|
|
b64e80fd60 | ||
|
|
fbf5fc7edf | ||
|
|
8defba4623 | ||
|
|
7f968ee050 | ||
|
|
dec5bbe39e | ||
|
|
63f3211cc4 |
@@ -673,39 +673,6 @@
|
||||
var SeasonalsConfigPage = {
|
||||
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) {
|
||||
var container = document.querySelector('#seasonalRulesList');
|
||||
var div = document.createElement('div');
|
||||
@@ -718,78 +685,84 @@
|
||||
var endMonth = data ? (data.EndMonth !== undefined ? data.EndMonth : (data.endMonth !== undefined ? data.endMonth : 1)) : 1;
|
||||
var theme = data ? (data.Theme || data.theme || 'none') : 'none';
|
||||
|
||||
div.innerHTML = `
|
||||
<div class="seasonal-rule-header">
|
||||
<div style="font-weight: bold; font-size: 1.1em;" class="rule-title"></div>
|
||||
<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-down" title="Move Down"><i class="material-icons">arrow_downward</i></button>
|
||||
<button type="button" is="paper-icon-button-light" class="btn-remove" title="Remove"><i class="material-icons">delete</i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="seasonal-rule-content">
|
||||
<div class="inputContainer" style="margin:0;">
|
||||
<label class="inputLabel">Name</label>
|
||||
<input is="emby-input" class="rule-name" onchange="SeasonalsConfigPage.updateRuleTitles();" />
|
||||
</div>
|
||||
<div class="date-range-group">
|
||||
<div class="selectContainer" style="margin:0; flex: 1;">
|
||||
<label class="selectLabel">Start Day</label>
|
||||
<select is="emby-select" class="rule-start-day" style="width: 100%;">
|
||||
${this.getDaysOptions(startDay)}
|
||||
</select>
|
||||
</div>
|
||||
<div class="selectContainer" style="margin:0; flex: 1;">
|
||||
<label class="selectLabel">Month</label>
|
||||
<select is="emby-select" class="rule-start-month" style="width: 100%;">
|
||||
${this.getMonthsOptions(startMonth)}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
var days = [];
|
||||
for (var i = 1; i <= 31; i++) days.push(i);
|
||||
|
||||
<div class="date-range-group">
|
||||
<div class="selectContainer" style="margin:0; flex: 1;">
|
||||
<label class="selectLabel">End Day</label>
|
||||
<select is="emby-select" class="rule-end-day" style="width: 100%;">
|
||||
${this.getDaysOptions(endDay)}
|
||||
</select>
|
||||
</div>
|
||||
<div class="selectContainer" style="margin:0; flex: 1;">
|
||||
<label class="selectLabel">Month</label>
|
||||
<select is="emby-select" class="rule-end-month" style="width: 100%;">
|
||||
${this.getMonthsOptions(endMonth)}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
var months = [
|
||||
{ v: 1, n: 'Jan' }, { v: 2, n: 'Feb' }, { v: 3, n: 'Mar' }, { v: 4, n: 'Apr' },
|
||||
{ v: 5, n: 'May' }, { v: 6, n: 'Jun' }, { v: 7, n: 'Jul' }, { v: 8, n: 'Aug' },
|
||||
{ v: 9, n: 'Sep' }, { v: 10, n: 'Oct' }, { v: 11, n: 'Nov' }, { v: 12, n: 'Dec' }
|
||||
];
|
||||
|
||||
<div class="selectContainer" style="margin:0;">
|
||||
<label class="selectLabel">Theme</label>
|
||||
<select is="emby-select" class="rule-theme" style="width: 100%;">
|
||||
<option value="none">None</option>
|
||||
<option value="snowflakes">Snowflakes</option>
|
||||
<option value="snowfall">Snowfall</option>
|
||||
<option value="snowstorm">Snowstorm</option>
|
||||
<option value="fireworks">Fireworks</option>
|
||||
<option value="halloween">Halloween</option>
|
||||
<option value="hearts">Hearts</option>
|
||||
<option value="christmas">Christmas</option>
|
||||
<option value="santa">Santa</option>
|
||||
<option value="autumn">Autumn</option>
|
||||
<option value="easter">Easter</option>
|
||||
<option value="resurrection">Resurrection</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
// Build select HTML via string concatenation to avoid Jellyfin's ${} localization processing
|
||||
function mkSelect(val, opts, cls) {
|
||||
var h = '<select class="emby-select emby-select-withcolor ' + cls + '" style="width: 100%; -webkit-appearance: menulist; appearance: menulist;">';
|
||||
opts.forEach(function(o) {
|
||||
var v = o.v || o;
|
||||
var n = o.n || o;
|
||||
h += '<option value="' + v + '" ' + (v == val ? 'selected' : '') + '>' + n + '</option>';
|
||||
});
|
||||
h += '</select>';
|
||||
return h;
|
||||
}
|
||||
|
||||
div.innerHTML =
|
||||
'<div class="seasonal-rule-header">' +
|
||||
' <div style="font-weight: bold; font-size: 1.1em;" class="rule-title"></div>' +
|
||||
' <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-down" title="Move Down"><i class="material-icons">arrow_downward</i></button>' +
|
||||
' <button type="button" is="paper-icon-button-light" class="btn-remove" title="Remove"><i class="material-icons">delete</i></button>' +
|
||||
' </div>' +
|
||||
'</div>' +
|
||||
'<div class="seasonal-rule-content">' +
|
||||
' <div class="inputContainer" style="margin:0;">' +
|
||||
' <label class="inputLabel">Name</label>' +
|
||||
' <input is="emby-input" class="rule-name" onchange="SeasonalsConfigPage.updateRuleTitles();" />' +
|
||||
' </div>' +
|
||||
' <div class="date-range-group">' +
|
||||
' <div class="selectContainer" style="margin:0; flex: 1;">' +
|
||||
' <label class="selectLabel">Start Day</label>' +
|
||||
mkSelect(startDay, days, 'rule-start-day') +
|
||||
' </div>' +
|
||||
' <div class="selectContainer" style="margin:0; flex: 1;">' +
|
||||
' <label class="selectLabel">Month</label>' +
|
||||
mkSelect(startMonth, months, 'rule-start-month') +
|
||||
' </div>' +
|
||||
' </div>' +
|
||||
' <div class="date-range-group">' +
|
||||
' <div class="selectContainer" style="margin:0; flex: 1;">' +
|
||||
' <label class="selectLabel">End Day</label>' +
|
||||
mkSelect(endDay, days, 'rule-end-day') +
|
||||
' </div>' +
|
||||
' <div class="selectContainer" style="margin:0; flex: 1;">' +
|
||||
' <label class="selectLabel">Month</label>' +
|
||||
mkSelect(endMonth, months, 'rule-end-month') +
|
||||
' </div>' +
|
||||
' </div>' +
|
||||
' <div class="selectContainer" style="margin:0;">' +
|
||||
' <label class="selectLabel">Theme</label>' +
|
||||
' <select class="emby-select emby-select-withcolor rule-theme" style="width: 100%; -webkit-appearance: menulist; appearance: menulist;">' +
|
||||
' <option value="none">None</option>' +
|
||||
' <option value="snowflakes">Snowflakes</option>' +
|
||||
' <option value="snowfall">Snowfall</option>' +
|
||||
' <option value="snowstorm">Snowstorm</option>' +
|
||||
' <option value="fireworks">Fireworks</option>' +
|
||||
' <option value="halloween">Halloween</option>' +
|
||||
' <option value="hearts">Hearts</option>' +
|
||||
' <option value="christmas">Christmas</option>' +
|
||||
' <option value="santa">Santa</option>' +
|
||||
' <option value="autumn">Autumn</option>' +
|
||||
' <option value="easter">Easter</option>' +
|
||||
' <option value="resurrection">Resurrection</option>' +
|
||||
' </select>' +
|
||||
' </div>' +
|
||||
'</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
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<!-- <TreatWarningsAsErrors>false</TreatWarningsAsErrors> -->
|
||||
<Title>Jellyfin Seasonals Plugin</Title>
|
||||
<Authors>CodeDevMLH</Authors>
|
||||
<Version>1.7.0.10</Version>
|
||||
<Version>1.7.0.14</Version>
|
||||
<RepositoryUrl>https://github.com/CodeDevMLH/Jellyfin-Seasonals</RepositoryUrl>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
"imageUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/Jellyfin-Seasonals-Plugin/raw/branch/main/logo.png",
|
||||
"versions": [
|
||||
{
|
||||
"version": "1.7.0.10",
|
||||
"version": "1.7.0.14",
|
||||
"changelog": "- feat: add customizable auto seasonal list via config page\n- feat: add new season theme 'resurrection' by Bioflash257",
|
||||
"targetAbi": "10.11.0.0",
|
||||
"sourceUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/Jellyfin-Seasonals-Plugin/releases/download/v1.7.0.10/Jellyfin.Plugin.Seasonals.zip",
|
||||
"checksum": "8ff32aad07b862b7b56aabad7ea0794b",
|
||||
"timestamp": "2026-02-16T22:02:52Z"
|
||||
"sourceUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/Jellyfin-Seasonals-Plugin/releases/download/v1.7.0.14/Jellyfin.Plugin.Seasonals.zip",
|
||||
"checksum": "028df715bde488d10ef207dc38ac1b87",
|
||||
"timestamp": "2026-02-16T23:02:32Z"
|
||||
},
|
||||
{
|
||||
"version": "1.6.3.0",
|
||||
|
||||
Reference in New Issue
Block a user