From b2f316856d03fa5f80b186ee887a053ee04ebf92 Mon Sep 17 00:00:00 2001 From: ConfusedPolarBear <33811686+ConfusedPolarBear@users.noreply.github.com> Date: Thu, 8 Jun 2023 00:51:18 -0500 Subject: [PATCH] Restore season count to support bundle --- .../Controllers/TroubleshootingController.cs | 5 ++++- ConfusedPolarBear.Plugin.IntroSkipper/Plugin.cs | 5 +++++ ConfusedPolarBear.Plugin.IntroSkipper/QueueManager.cs | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/Controllers/TroubleshootingController.cs b/ConfusedPolarBear.Plugin.IntroSkipper/Controllers/TroubleshootingController.cs index b8319cb..0b0ab11 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/Controllers/TroubleshootingController.cs +++ b/ConfusedPolarBear.Plugin.IntroSkipper/Controllers/TroubleshootingController.cs @@ -42,6 +42,7 @@ public TroubleshootingController( [Produces(MediaTypeNames.Text.Plain)] public ActionResult GetSupportBundle() { + var config = Plugin.Instance!.Configuration; var bundle = new StringBuilder(); bundle.Append("* Jellyfin version: "); @@ -69,7 +70,9 @@ public ActionResult GetSupportBundle() bundle.Append("* Queue contents: "); bundle.Append(Plugin.Instance!.TotalQueued); - bundle.Append(" episodes\n"); + bundle.Append(" episodes, "); + bundle.Append(Plugin.Instance!.TotalSeasons); + bundle.Append(" seasons\n"); bundle.Append("* Warnings: `"); bundle.Append(WarningManager.GetWarnings()); diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/Plugin.cs b/ConfusedPolarBear.Plugin.IntroSkipper/Plugin.cs index 07c5ca8..8ff597a 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/Plugin.cs +++ b/ConfusedPolarBear.Plugin.IntroSkipper/Plugin.cs @@ -136,6 +136,11 @@ public Plugin( /// public int TotalQueued { get; set; } + /// + /// Gets or sets the number of seasons in the queue. + /// + public int TotalSeasons { get; set; } + /// /// Gets the directory to cache fingerprints in. /// diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/QueueManager.cs b/ConfusedPolarBear.Plugin.IntroSkipper/QueueManager.cs index bfe2105..ac28097 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/QueueManager.cs +++ b/ConfusedPolarBear.Plugin.IntroSkipper/QueueManager.cs @@ -79,6 +79,7 @@ public ReadOnlyDictionary> GetMediaItems() } } + Plugin.Instance!.TotalSeasons = _queuedEpisodes.Count; Plugin.Instance!.QueuedMediaItems.Clear(); foreach (var kvp in _queuedEpisodes) {