diff --git a/Jellyfin.Plugin.Seasonals/Configuration/PluginConfiguration.cs b/Jellyfin.Plugin.Seasonals/Configuration/PluginConfiguration.cs
index af7228c..b70248a 100644
--- a/Jellyfin.Plugin.Seasonals/Configuration/PluginConfiguration.cs
+++ b/Jellyfin.Plugin.Seasonals/Configuration/PluginConfiguration.cs
@@ -160,6 +160,7 @@ public class ChristmasOptions {
public class EarthDayOptions {
public bool EnableEarthDay { get; set; } = true;
public int FlowersCount { get; set; } = 60;
+ public int FlowersCountMobile { get; set; } = 20;
}
public class EasterOptions {
diff --git a/Jellyfin.Plugin.Seasonals/Configuration/configPage.html b/Jellyfin.Plugin.Seasonals/Configuration/configPage.html
index f8156df..fb72805 100644
--- a/Jellyfin.Plugin.Seasonals/Configuration/configPage.html
+++ b/Jellyfin.Plugin.Seasonals/Configuration/configPage.html
@@ -125,8 +125,6 @@
Configure specific settings for each seasonal theme
-
-
All symbol count settings add this number in addition to the standard 12 symbols (if additional symbols is enabled).
Autumn
+
@@ -1664,7 +1667,8 @@
// EarthDay
document.querySelector('#EnableEarthDay').checked = config.EarthDay.EnableEarthDay;
- document.querySelector('#EarthDayFlowersCount').value = config.EarthDay.FlowersCount;
+ document.querySelector('#EarthDayFlowersCount').value = config.EarthDay.FlowersCount !== undefined ? config.EarthDay.FlowersCount : 60;
+ document.querySelector('#EarthDayFlowersCountMobile').value = config.EarthDay.FlowersCountMobile !== undefined ? config.EarthDay.FlowersCountMobile : 20;
// Easter
@@ -2044,6 +2048,7 @@
// Earth Day
config.EarthDay.EnableEarthDay = document.querySelector('#EnableEarthDay').checked;
config.EarthDay.FlowersCount = parseInt(document.querySelector('#EarthDayFlowersCount').value);
+ config.EarthDay.FlowersCountMobile = parseInt(document.querySelector('#EarthDayFlowersCountMobile').value);
// Eurovision
config.Eurovision.EnableEurovision = document.querySelector('#EnableEurovision').checked;
@@ -2167,6 +2172,7 @@
// Earth Day
config.EarthDay.EnableEarthDay = document.querySelector('#EnableEarthDay').checked;
config.EarthDay.FlowersCount = parseInt(document.querySelector('#EarthDayFlowersCount').value);
+ config.EarthDay.FlowersCountMobile = parseInt(document.querySelector('#EarthDayFlowersCountMobile').value);
// Eurovision (second pass - deduplicated)
config.Eurovision.EnableEurovision = document.querySelector('#EnableEurovision').checked;
diff --git a/Jellyfin.Plugin.Seasonals/Web/earthday.js b/Jellyfin.Plugin.Seasonals/Web/earthday.js
index 9c25452..b2e694f 100644
--- a/Jellyfin.Plugin.Seasonals/Web/earthday.js
+++ b/Jellyfin.Plugin.Seasonals/Web/earthday.js
@@ -1,7 +1,8 @@
const config = window.SeasonalsPluginConfig?.EarthDay || {};
const enabled = config.EnableEarthDay !== undefined ? config.EnableEarthDay : true; // enable/disable earthday
-const flowersCount = config.FlowersCount !== undefined ? config.FlowersCount : 60; // count of vine
+const flowersCount = config.FlowersCount !== undefined ? config.FlowersCount : 60; // count of flowers
+const flowersCountMobile = config.FlowersCountMobile !== undefined ? config.FlowersCountMobile : 20; // count of flowers on mobile
const flowerColors = ['#FF69B4', '#FFD700', '#87CEFA', '#FF4500', '#BA55D3', '#FFA500', '#FF1493'];
@@ -68,7 +69,8 @@ function createElements() {
}
// Generate Flowers
- const flowerCount = Math.max(10, flowersCount);
+ const isMobile = window.matchMedia("only screen and (max-width: 768px)").matches;
+ const flowerCount = Math.max(5, isMobile ? flowersCountMobile : flowersCount);
for (let i = 0; i < flowerCount; i++) {
const x = 10 + Math.random() * (w - 20);
const y = hSVG * 0.1 + Math.random() * (hSVG * 0.5);