426 lines
16 KiB
C#
426 lines
16 KiB
C#
using MediaBrowser.Model.Plugins;
|
|
|
|
namespace Jellyfin.Plugin.Seasonals.Configuration;
|
|
|
|
/// <summary>
|
|
/// Plugin configuration.
|
|
/// </summary>
|
|
public class PluginConfiguration : BasePluginConfiguration
|
|
{
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="PluginConfiguration"/> class.
|
|
/// </summary>
|
|
public PluginConfiguration()
|
|
{
|
|
IsEnabled = true;
|
|
SelectedSeason = "none";
|
|
AutomateSeasonSelection = true;
|
|
EnableClientSideToggle = true;
|
|
|
|
Autumn = new AutumnOptions();
|
|
Snowflakes = new SnowflakesOptions();
|
|
Snowfall = new SnowfallOptions();
|
|
Snowstorm = new SnowstormOptions();
|
|
Fireworks = new FireworksOptions();
|
|
Halloween = new HalloweenOptions();
|
|
Hearts = new HeartsOptions();
|
|
Christmas = new ChristmasOptions();
|
|
Santa = new SantaOptions();
|
|
Easter = new EasterOptions();
|
|
Resurrection = new ResurrectionOptions();
|
|
Spring = new SpringOptions();
|
|
Summer = new SummerOptions();
|
|
CherryBlossom = new CherryBlossomOptions();
|
|
Carnival = new CarnivalOptions();
|
|
PiDay = new PiDayOptions();
|
|
Eurovision = new EurovisionOptions();
|
|
Storm = new StormOptions();
|
|
Pride = new PrideOptions();
|
|
EarthDay = new EarthDayOptions();
|
|
Rain = new RainOptions();
|
|
Frost = new FrostOptions();
|
|
FilmNoir = new FilmNoirOptions();
|
|
Oscar = new OscarOptions();
|
|
MarioDay = new MarioDayOptions();
|
|
StarWars = new StarWarsOptions();
|
|
Oktoberfest = new OktoberfestOptions();
|
|
Friday13 = new Friday13Options();
|
|
Eid = new EidOptions();
|
|
Spooky = new SpookyOptions();
|
|
Sports = new SportsOptions();
|
|
Olympia = new OlympiaOptions();
|
|
Space = new SpaceOptions();
|
|
Underwater = new UnderwaterOptions();
|
|
Birthday = new BirthdayOptions();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets a value indicating whether the plugin is enabled.
|
|
/// </summary>
|
|
public bool IsEnabled { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the selected season.
|
|
/// </summary>
|
|
public string SelectedSeason { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets a value indicating whether to automate season selection.
|
|
/// </summary>
|
|
public bool AutomateSeasonSelection { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets a value indicating whether to enable client-side toggle for users.
|
|
/// </summary>
|
|
public bool EnableClientSideToggle { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the seasonal rules configuration as JSON.
|
|
/// </summary>
|
|
public string SeasonalRules { get; set; } = "[{\"Name\":\"New Year Fireworks\",\"StartDay\":28,\"StartMonth\":12,\"EndDay\":5,\"EndMonth\":1,\"Theme\":\"fireworks\"},{\"Name\":\"Carnival\",\"StartDay\":19,\"StartMonth\":2,\"EndDay\":28,\"EndMonth\":2,\"Theme\":\"carnival\"},{\"Name\":\"Valentine's Day\",\"StartDay\":10,\"StartMonth\":2,\"EndDay\":18,\"EndMonth\":2,\"Theme\":\"hearts\"},{\"Name\":\"Spring\",\"StartDay\":1,\"StartMonth\":3,\"EndDay\":31,\"EndMonth\":5,\"Theme\":\"spring\"},{\"Name\":\"Summer\",\"StartDay\":1,\"StartMonth\":6,\"EndDay\":31,\"EndMonth\":8,\"Theme\":\"summer\"},{\"Name\":\"Santa\",\"StartDay\":22,\"StartMonth\":12,\"EndDay\":27,\"EndMonth\":12,\"Theme\":\"santa\"},{\"Name\":\"Snowflakes (December)\",\"StartDay\":1,\"StartMonth\":12,\"EndDay\":31,\"EndMonth\":12,\"Theme\":\"snowflakes\"},{\"Name\":\"Snowfall (January)\",\"StartDay\":1,\"StartMonth\":1,\"EndDay\":31,\"EndMonth\":1,\"Theme\":\"snowfall\"},{\"Name\":\"Snowfall (February)\",\"StartDay\":1,\"StartMonth\":2,\"EndDay\":29,\"EndMonth\":2,\"Theme\":\"snowfall\"},{\"Name\":\"Easter\",\"StartDay\":25,\"StartMonth\":3,\"EndDay\":25,\"EndMonth\":4,\"Theme\":\"easter\"},{\"Name\":\"Halloween\",\"StartDay\":24,\"StartMonth\":10,\"EndDay\":5,\"EndMonth\":11,\"Theme\":\"halloween\"},{\"Name\":\"Autumn\",\"StartDay\":1,\"StartMonth\":9,\"EndDay\":30,\"EndMonth\":11,\"Theme\":\"autumn\"},{\"Name\":\"Cherry Blossom\",\"StartDay\":1,\"StartMonth\":4,\"EndDay\":30,\"EndMonth\":4,\"Theme\":\"cherryblossom\"}]";
|
|
|
|
/// <summary>
|
|
/// Gets or sets the Seasonals options.
|
|
/// </summary>
|
|
public AutumnOptions Autumn { get; set; }
|
|
public SnowflakesOptions Snowflakes { get; set; }
|
|
public SnowfallOptions Snowfall { get; set; }
|
|
public SnowstormOptions Snowstorm { get; set; }
|
|
public FireworksOptions Fireworks { get; set; }
|
|
public HalloweenOptions Halloween { get; set; }
|
|
public HeartsOptions Hearts { get; set; }
|
|
public ChristmasOptions Christmas { get; set; }
|
|
public SantaOptions Santa { get; set; }
|
|
public EasterOptions Easter { get; set; }
|
|
public ResurrectionOptions Resurrection { get; set; }
|
|
public SpringOptions Spring { get; set; }
|
|
public SummerOptions Summer { get; set; }
|
|
public CherryBlossomOptions CherryBlossom { get; set; }
|
|
public CarnivalOptions Carnival { get; set; }
|
|
public PiDayOptions PiDay { get; set; }
|
|
public EurovisionOptions Eurovision { get; set; }
|
|
public StormOptions Storm { get; set; }
|
|
public PrideOptions Pride { get; set; }
|
|
public EarthDayOptions EarthDay { get; set; }
|
|
public RainOptions Rain { get; set; }
|
|
public FrostOptions Frost { get; set; }
|
|
public FilmNoirOptions FilmNoir { get; set; }
|
|
public OscarOptions Oscar { get; set; }
|
|
public MarioDayOptions MarioDay { get; set; }
|
|
public StarWarsOptions StarWars { get; set; }
|
|
public OktoberfestOptions Oktoberfest { get; set; }
|
|
public Friday13Options Friday13 { get; set; }
|
|
public EidOptions Eid { get; set; }
|
|
public SpookyOptions Spooky { get; set; }
|
|
public SportsOptions Sports { get; set; }
|
|
public OlympiaOptions Olympia { get; set; }
|
|
public SpaceOptions Space { get; set; }
|
|
public UnderwaterOptions Underwater { get; set; }
|
|
public BirthdayOptions Birthday { get; set; }
|
|
}
|
|
|
|
public class AutumnOptions
|
|
{
|
|
public int LeafCount { get; set; } = 25;
|
|
public bool EnableAutumn { get; set; } = true;
|
|
public bool EnableRandomLeaves { get; set; } = true;
|
|
public bool EnableRandomLeavesMobile { get; set; } = false;
|
|
public bool EnableDifferentDuration { get; set; } = true;
|
|
public bool EnableRotation { get; set; } = false;
|
|
}
|
|
|
|
public class SnowflakesOptions
|
|
{
|
|
public int SnowflakeCount { get; set; } = 25;
|
|
public bool EnableSnowflakes { get; set; } = true;
|
|
public bool EnableRandomSnowflakes { get; set; } = true;
|
|
public bool EnableRandomSnowflakesMobile { get; set; } = false;
|
|
public bool EnableColoredSnowflakes { get; set; } = true;
|
|
public bool EnableDifferentDuration { get; set; } = true;
|
|
}
|
|
|
|
public class SnowfallOptions
|
|
{
|
|
public int SnowflakesCount { get; set; } = 500;
|
|
public int SnowflakesCountMobile { get; set; } = 250;
|
|
public double Speed { get; set; } = 3;
|
|
public bool EnableSnowfall { get; set; } = true;
|
|
}
|
|
|
|
public class SnowstormOptions
|
|
{
|
|
public int SnowflakesCount { get; set; } = 500;
|
|
public int SnowflakesCountMobile { get; set; } = 250;
|
|
public double Speed { get; set; } = 6;
|
|
public bool EnableSnowstorm { get; set; } = true;
|
|
public double HorizontalWind { get; set; } = 4;
|
|
public double VerticalVariation { get; set; } = 2;
|
|
}
|
|
|
|
public class FireworksOptions
|
|
{
|
|
public int ParticleCount { get; set; } = 50;
|
|
public int LaunchInterval { get; set; } = 3200;
|
|
public bool EnableFireworks { get; set; } = true;
|
|
public bool ScrollFireworks { get; set; } = true;
|
|
public int MinFireworks { get; set; } = 3;
|
|
public int MaxFireworks { get; set; } = 6;
|
|
}
|
|
|
|
public class HalloweenOptions
|
|
{
|
|
public int SymbolCount { get; set; } = 25;
|
|
public bool EnableHalloween { get; set; } = true;
|
|
public bool EnableRandomSymbols { get; set; } = true;
|
|
public bool EnableRandomSymbolsMobile { get; set; } = false;
|
|
public bool EnableDifferentDuration { get; set; } = true;
|
|
public bool EnableSpiders { get; set; } = true;
|
|
public bool EnableMice { get; set; } = true;
|
|
}
|
|
|
|
public class HeartsOptions
|
|
{
|
|
public int SymbolCount { get; set; } = 25;
|
|
public bool EnableHearts { get; set; } = true;
|
|
public bool EnableRandomSymbols { get; set; } = true;
|
|
public bool EnableRandomSymbolsMobile { get; set; } = false;
|
|
public bool EnableDifferentDuration { get; set; } = true;
|
|
}
|
|
|
|
public class ChristmasOptions
|
|
{
|
|
public int SymbolCount { get; set; } = 25;
|
|
public bool EnableChristmas { get; set; } = true;
|
|
public bool EnableRandomChristmas { get; set; } = true;
|
|
public bool EnableRandomChristmasMobile { get; set; } = false;
|
|
public bool EnableDifferentDuration { get; set; } = true;
|
|
}
|
|
|
|
public class SantaOptions
|
|
{
|
|
public int SnowflakesCount { get; set; } = 500;
|
|
public int SnowflakesCountMobile { get; set; } = 250;
|
|
public double SantaSpeed { get; set; } = 10;
|
|
public double SantaSpeedMobile { get; set; } = 8;
|
|
public bool EnableSanta { get; set; } = true;
|
|
public double SnowFallSpeed { get; set; } = 3;
|
|
public double MaxSantaRestTime { get; set; } = 8;
|
|
public double MinSantaRestTime { get; set; } = 3;
|
|
public double MaxPresentFallSpeed { get; set; } = 5;
|
|
public double MinPresentFallSpeed { get; set; } = 2;
|
|
}
|
|
|
|
public class EasterOptions
|
|
{
|
|
public int EggCount { get; set; } = 20;
|
|
public bool EnableEaster { get; set; } = true;
|
|
public bool EnableRandomEaster { get; set; } = true;
|
|
public bool EnableRandomEasterMobile { get; set; } = false;
|
|
public bool EnableDifferentDuration { get; set; } = true;
|
|
public bool EnableBunny { get; set; } = true;
|
|
public int BunnyDuration { get; set; } = 12000;
|
|
public int HopHeight { get; set; } = 12;
|
|
public int MinBunnyRestTime { get; set; } = 2000;
|
|
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;
|
|
}
|
|
|
|
public class SpringOptions
|
|
{
|
|
public int PollenCount { get; set; } = 30;
|
|
public int SunbeamCount { get; set; } = 5;
|
|
public int BirdCount { get; set; } = 4;
|
|
public int ButterflyCount { get; set; } = 4;
|
|
public int BeeCount { get; set; } = 2;
|
|
public int LadybugCount { get; set; } = 2;
|
|
public bool EnableSpring { get; set; } = true;
|
|
public bool EnableSpringSunbeams { get; set; } = true;
|
|
public bool EnableRandomSpring { get; set; } = true;
|
|
public bool EnableRandomSpringMobile { get; set; } = false;
|
|
public bool EnableDifferentDuration { get; set; } = true;
|
|
}
|
|
|
|
public class SummerOptions
|
|
{
|
|
public int BubbleCount { get; set; } = 20;
|
|
public int DustCount { get; set; } = 50;
|
|
public bool EnableSummer { get; set; } = true;
|
|
public bool EnableRandomSummer { get; set; } = true;
|
|
public bool EnableRandomSummerMobile { get; set; } = false;
|
|
public bool EnableDifferentDuration { get; set; } = true;
|
|
}
|
|
|
|
public class CarnivalOptions
|
|
{
|
|
public int ObjectCount { get; set; } = 25;
|
|
public bool EnableCarnival { get; set; } = true;
|
|
public bool EnableRandomCarnival { get; set; } = true;
|
|
public bool EnableRandomCarnivalMobile { get; set; } = false;
|
|
public bool EnableDifferentDuration { get; set; } = true;
|
|
public bool EnableCarnivalSway { get; set; } = true;
|
|
}
|
|
|
|
public class CherryBlossomOptions
|
|
{
|
|
public int PetalCount { get; set; } = 25;
|
|
public bool EnableCherryBlossom { get; set; } = true;
|
|
public bool EnableRandomCherryBlossom { get; set; } = true;
|
|
public bool EnableRandomCherryBlossomMobile { get; set; } = false;
|
|
public bool EnableDifferentDuration { get; set; } = true;
|
|
}
|
|
|
|
public class PiDayOptions
|
|
{
|
|
public int SymbolCount { get; set; } = 50;
|
|
public bool EnablePiDay { get; set; } = true;
|
|
public bool EnableRandomPiDay { get; set; } = true;
|
|
public bool EnableRandomPiDayMobile { get; set; } = false;
|
|
public bool EnableDifferentDuration { get; set; } = true;
|
|
public bool EnablePiDayBackground { get; set; } = false;
|
|
}
|
|
|
|
public class EurovisionOptions
|
|
{
|
|
public int SymbolCount { get; set; } = 25;
|
|
public bool EnableEurovision { get; set; } = true;
|
|
public bool EnableRandomEurovision { get; set; } = true;
|
|
public bool EnableRandomEurovisionMobile { get; set; } = false;
|
|
public bool EnableDifferentDuration { get; set; } = true;
|
|
public bool EnableColorfulNotes { get; set; } = true;
|
|
public string EurovisionColors { get; set; } = "#ff0026ff,#17a6ffff,#32d432ff,#FFD700,#f0821bff,#f826f8ff";
|
|
public int EurovisionGlowSize { get; set; } = 8;
|
|
}
|
|
|
|
public class StormOptions
|
|
{
|
|
public int RaindropCount { get; set; } = 300;
|
|
public int RaindropCountMobile { get; set; } = 150;
|
|
public bool EnableStorm { get; set; } = true;
|
|
public bool EnableLightning { get; set; } = true;
|
|
public double RainSpeed { get; set; } = 1;
|
|
}
|
|
|
|
public class PrideOptions
|
|
{
|
|
public bool EnablePride { get; set; } = true;
|
|
public int HeartCount { get; set; } = 20;
|
|
public int HeartSize { get; set; } = 2;
|
|
public bool ColorHeader { get; set; } = true;
|
|
}
|
|
|
|
public class EarthDayOptions
|
|
{
|
|
public bool EnableEarthDay { get; set; } = true;
|
|
public int VineCount { get; set; } = 4;
|
|
}
|
|
|
|
public class RainOptions
|
|
{
|
|
public bool EnableRain { get; set; } = true;
|
|
public int RaindropCount { get; set; } = 300;
|
|
public int RaindropCountMobile { get; set; } = 150;
|
|
public double RainSpeed { get; set; } = 1;
|
|
}
|
|
|
|
public class FrostOptions
|
|
{
|
|
public bool EnableFrost { get; set; } = true;
|
|
}
|
|
|
|
public class FilmNoirOptions
|
|
{
|
|
public bool EnableFilmNoir { get; set; } = true;
|
|
}
|
|
|
|
public class OscarOptions
|
|
{
|
|
public bool EnableOscar { get; set; } = true;
|
|
}
|
|
|
|
public class MarioDayOptions
|
|
{
|
|
public bool EnableMarioDay { get; set; } = true;
|
|
}
|
|
|
|
public class StarWarsOptions
|
|
{
|
|
public bool EnableStarWars { get; set; } = true;
|
|
}
|
|
|
|
public class OktoberfestOptions
|
|
{
|
|
public bool EnableOktoberfest { get; set; } = true;
|
|
}
|
|
|
|
public class Friday13Options
|
|
{
|
|
public bool EnableFriday13 { get; set; } = true;
|
|
}
|
|
|
|
public class EidOptions
|
|
{
|
|
public bool EnableEid { get; set; } = true;
|
|
}
|
|
|
|
public class SpookyOptions
|
|
{
|
|
public bool EnableSpooky { get; set; } = true;
|
|
public int SymbolCount { get; set; } = 25;
|
|
public bool EnableSpookySway { get; set; } = true;
|
|
public int SpookySize { get; set; } = 20;
|
|
public int SpookyGlowSize { get; set; } = 2;
|
|
}
|
|
|
|
public class SportsOptions
|
|
{
|
|
public int SymbolCount { get; set; } = 25;
|
|
public bool EnableSports { get; set; } = true;
|
|
public bool EnableRandomSymbols { get; set; } = true;
|
|
public bool EnableRandomSymbolsMobile { get; set; } = false;
|
|
public bool EnableDifferentDuration { get; set; } = true;
|
|
}
|
|
|
|
public class OlympiaOptions
|
|
{
|
|
public int SymbolCount { get; set; } = 25;
|
|
public bool EnableOlympia { get; set; } = true;
|
|
public bool EnableRandomSymbols { get; set; } = true;
|
|
public bool EnableRandomSymbolsMobile { get; set; } = false;
|
|
public bool EnableDifferentDuration { get; set; } = true;
|
|
}
|
|
|
|
public class SpaceOptions
|
|
{
|
|
public int SymbolCount { get; set; } = 25;
|
|
public bool EnableSpace { get; set; } = true;
|
|
public bool EnableRandomSymbols { get; set; } = true;
|
|
public bool EnableRandomSymbolsMobile { get; set; } = false;
|
|
public bool EnableDifferentDuration { get; set; } = true;
|
|
}
|
|
|
|
public class UnderwaterOptions
|
|
{
|
|
public int SymbolCount { get; set; } = 15;
|
|
public bool EnableUnderwater { get; set; } = true;
|
|
public bool EnableRandomSymbols { get; set; } = true;
|
|
public bool EnableRandomSymbolsMobile { get; set; } = false;
|
|
public bool EnableDifferentDuration { get; set; } = true;
|
|
}
|
|
|
|
public class BirthdayOptions
|
|
{
|
|
public int SymbolCount { get; set; } = 25;
|
|
public bool EnableBirthday { get; set; } = true;
|
|
public bool EnableRandomSymbols { get; set; } = true;
|
|
public bool EnableRandomSymbolsMobile { get; set; } = false;
|
|
public bool EnableDifferentDuration { get; set; } = true;
|
|
}
|