Use primary constructor everywhere

This commit is contained in:
rlauu 2024-10-16 16:20:21 +02:00
parent ca9a167ad5
commit fc830a5e6f
16 changed files with 1081 additions and 1070 deletions

View File

@ -1,5 +1,6 @@
using System;
using ConfusedPolarBear.Plugin.IntroSkipper.Data;
using ConfusedPolarBear.Plugin.IntroSkipper.Manager;
using Xunit;
namespace ConfusedPolarBear.Plugin.IntroSkipper.Tests;

View File

@ -5,8 +5,8 @@ using ConfusedPolarBear.Plugin.IntroSkipper.Configuration;
using ConfusedPolarBear.Plugin.IntroSkipper.Data;
using Microsoft.Extensions.Logging;
namespace ConfusedPolarBear.Plugin.IntroSkipper;
namespace ConfusedPolarBear.Plugin.IntroSkipper.Analyzers
{
/// <summary>
/// Analyzer Helper.
/// </summary>
@ -114,3 +114,4 @@ public class AnalyzerHelper
silenceRange.Start >= adjustedIntro.Start;
}
}
}

View File

@ -23,8 +23,4 @@
<EmbeddedResource Include="Configuration\visualizer.js" />
<EmbeddedResource Include="Configuration\inject.js" />
</ItemGroup>
<ItemGroup>
<Folder Include="Manager\" />
<Folder Include="Services\" />
</ItemGroup>
</Project>

View File

@ -6,7 +6,7 @@ using System.Runtime.Serialization;
using System.Xml;
using ConfusedPolarBear.Plugin.IntroSkipper.Data;
namespace ConfusedPolarBear.Plugin.IntroSkipper
namespace ConfusedPolarBear.Plugin.IntroSkipper.Helper
{
internal sealed class XmlSerializationHelper
{

View File

@ -4,8 +4,8 @@ using System.IO;
using ConfusedPolarBear.Plugin.IntroSkipper.Data;
using Microsoft.Extensions.Logging;
namespace ConfusedPolarBear.Plugin.IntroSkipper;
namespace ConfusedPolarBear.Plugin.IntroSkipper.Manager
{
/// <summary>
/// Update EDL files associated with a list of episodes.
/// </summary>
@ -114,3 +114,4 @@ public static class EdlManager
return Path.ChangeExtension(mediaPath, "edl");
}
}
}

View File

@ -10,8 +10,8 @@ using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Controller.Library;
using Microsoft.Extensions.Logging;
namespace ConfusedPolarBear.Plugin.IntroSkipper;
namespace ConfusedPolarBear.Plugin.IntroSkipper.Manager
{
/// <summary>
/// Manages enqueuing library items for analysis.
/// </summary>
@ -294,3 +294,4 @@ public class QueueManager(ILogger<QueueManager> logger, ILibraryManager libraryM
return (verified, reqModes);
}
}
}

View File

@ -6,6 +6,7 @@ using System.Linq;
using System.Text.RegularExpressions;
using ConfusedPolarBear.Plugin.IntroSkipper.Configuration;
using ConfusedPolarBear.Plugin.IntroSkipper.Data;
using ConfusedPolarBear.Plugin.IntroSkipper.Helper;
using MediaBrowser.Common;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Plugins;

View File

@ -1,4 +1,5 @@
using ConfusedPolarBear.Plugin.IntroSkipper.Providers;
using ConfusedPolarBear.Plugin.IntroSkipper.Services;
using MediaBrowser.Controller;
using MediaBrowser.Controller.Plugins;
using Microsoft.Extensions.DependencyInjection;

View File

@ -6,6 +6,7 @@ using System.Threading;
using System.Threading.Tasks;
using ConfusedPolarBear.Plugin.IntroSkipper.Analyzers;
using ConfusedPolarBear.Plugin.IntroSkipper.Data;
using ConfusedPolarBear.Plugin.IntroSkipper.Manager;
using MediaBrowser.Controller.Library;
using Microsoft.Extensions.Logging;

View File

@ -4,6 +4,7 @@ using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using ConfusedPolarBear.Plugin.IntroSkipper.Manager;
using MediaBrowser.Controller.Library;
using MediaBrowser.Model.Tasks;
using Microsoft.Extensions.Logging;

View File

@ -4,6 +4,7 @@ using System.Collections.ObjectModel;
using System.Threading;
using System.Threading.Tasks;
using ConfusedPolarBear.Plugin.IntroSkipper.Data;
using ConfusedPolarBear.Plugin.IntroSkipper.Services;
using MediaBrowser.Controller.Library;
using MediaBrowser.Model.Tasks;
using Microsoft.Extensions.Logging;

View File

@ -4,6 +4,7 @@ using System.Collections.ObjectModel;
using System.Threading;
using System.Threading.Tasks;
using ConfusedPolarBear.Plugin.IntroSkipper.Data;
using ConfusedPolarBear.Plugin.IntroSkipper.Services;
using MediaBrowser.Controller.Library;
using MediaBrowser.Model.Tasks;
using Microsoft.Extensions.Logging;

View File

@ -4,6 +4,7 @@ using System.Collections.ObjectModel;
using System.Threading;
using System.Threading.Tasks;
using ConfusedPolarBear.Plugin.IntroSkipper.Data;
using ConfusedPolarBear.Plugin.IntroSkipper.Services;
using MediaBrowser.Controller.Library;
using MediaBrowser.Model.Tasks;
using Microsoft.Extensions.Logging;

View File

@ -15,8 +15,8 @@ using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Timer = System.Timers.Timer;
namespace ConfusedPolarBear.Plugin.IntroSkipper;
namespace ConfusedPolarBear.Plugin.IntroSkipper.Services
{
/// <summary>
/// Automatically skip past introduction sequences.
/// Commands clients to seek to the end of the intro as soon as they start playing it.
@ -228,3 +228,4 @@ public class AutoSkip(
return Task.CompletedTask;
}
}
}

View File

@ -15,8 +15,8 @@ using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Timer = System.Timers.Timer;
namespace ConfusedPolarBear.Plugin.IntroSkipper;
namespace ConfusedPolarBear.Plugin.IntroSkipper.Services
{
/// <summary>
/// Automatically skip past credit sequences.
/// Commands clients to seek to the end of the credits as soon as they start playing it.
@ -228,3 +228,4 @@ public class AutoSkipCredits(
return Task.CompletedTask;
}
}
}

View File

@ -4,6 +4,7 @@ using System.Threading;
using System.Threading.Tasks;
using ConfusedPolarBear.Plugin.IntroSkipper.Configuration;
using ConfusedPolarBear.Plugin.IntroSkipper.Data;
using ConfusedPolarBear.Plugin.IntroSkipper.Manager;
using ConfusedPolarBear.Plugin.IntroSkipper.ScheduledTasks;
using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Controller.Library;
@ -13,8 +14,8 @@ using MediaBrowser.Model.Tasks;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
namespace ConfusedPolarBear.Plugin.IntroSkipper;
namespace ConfusedPolarBear.Plugin.IntroSkipper.Services
{
/// <summary>
/// Server entrypoint.
/// </summary>
@ -324,3 +325,4 @@ public sealed class Entrypoint : IHostedService, IDisposable
_autoTaskCompletEvent.Dispose();
}
}
}