diff --git a/Jellyfin.Plugin.Seasonals/Helpers/TransformationPatches.cs b/Jellyfin.Plugin.Seasonals/Helpers/TransformationPatches.cs new file mode 100644 index 0000000..e958a65 --- /dev/null +++ b/Jellyfin.Plugin.Seasonals/Helpers/TransformationPatches.cs @@ -0,0 +1,49 @@ +using System; +using Jellyfin.Plugin.Seasonals.Model; + +namespace Jellyfin.Plugin.Seasonals.Helpers +{ + public static class TransformationPatches + { + public static string IndexHtml(PatchRequestPayload payload) + { + // Always return original content if something fails or is null + string? originalContents = payload?.Contents; + + if (string.IsNullOrEmpty(originalContents)) + { + return originalContents ?? string.Empty; + } + + try + { + + // Safety Check: If plugin is disabled, do nothing + if (SeasonalsPlugin.Instance?.Configuration.IsEnabled != true) + { + return originalContents; + } + + // Use StringBuilder for efficient modification + var builder = new System.Text.StringBuilder(originalContents); + + // Inject Script if missing + if (!originalContents.Contains("seasonals.js", StringComparison.Ordinal)) + { + var scriptIndex = originalContents.LastIndexOf(ScriptInjector.ScriptMarker, StringComparison.OrdinalIgnoreCase); + if (scriptIndex != -1) + { + builder.Insert(scriptIndex, ScriptInjector.ScriptTag + Environment.NewLine); + } + } + + return builder.ToString(); + } + catch + { + // On error, return original content to avoid breaking the UI + return originalContents; + } + } + } +} diff --git a/Jellyfin.Plugin.Seasonals/Jellyfin.Plugin.Seasonals.csproj b/Jellyfin.Plugin.Seasonals/Jellyfin.Plugin.Seasonals.csproj index eee818c..0e464e6 100644 --- a/Jellyfin.Plugin.Seasonals/Jellyfin.Plugin.Seasonals.csproj +++ b/Jellyfin.Plugin.Seasonals/Jellyfin.Plugin.Seasonals.csproj @@ -12,7 +12,7 @@ Jellyfin Seasonals Plugin CodeDevMLH - 1.4.0.0 + 1.5.0.0 https://github.com/CodeDevMLH/Jellyfin-Seasonals diff --git a/Jellyfin.Plugin.Seasonals/Model/PatchRequestPayload.cs b/Jellyfin.Plugin.Seasonals/Model/PatchRequestPayload.cs new file mode 100644 index 0000000..5579b2e --- /dev/null +++ b/Jellyfin.Plugin.Seasonals/Model/PatchRequestPayload.cs @@ -0,0 +1,10 @@ +using System.Text.Json.Serialization; + +namespace Jellyfin.Plugin.Seasonals.Model +{ + public class PatchRequestPayload + { + [JsonPropertyName("contents")] + public string? Contents { get; set; } + } +} diff --git a/Jellyfin.Plugin.Seasonals/ScriptInjector.cs b/Jellyfin.Plugin.Seasonals/ScriptInjector.cs index 7163789..3f3dcbd 100644 --- a/Jellyfin.Plugin.Seasonals/ScriptInjector.cs +++ b/Jellyfin.Plugin.Seasonals/ScriptInjector.cs @@ -1,8 +1,13 @@ using System; using System.IO; using System.Reflection; +using System.Runtime.Loader; using Microsoft.Extensions.Logging; +using Newtonsoft.Json.Linq; using MediaBrowser.Common.Configuration; +using Jellyfin.Plugin.Seasonals.Helpers; +using System.Collections.Generic; +using System.Linq; namespace Jellyfin.Plugin.Seasonals; @@ -13,8 +18,8 @@ public class ScriptInjector { private readonly IApplicationPaths _appPaths; private readonly ILogger _logger; - private const string ScriptTag = ""; - private const string Marker = ""; + public const string ScriptTag = ""; + public const string Marker = ""; /// /// Initializes a new instance of the class. @@ -30,98 +35,92 @@ public class ScriptInjector /// /// Injects the script tag into index.html if it's not already present. /// - /// True if injection was successful or already present, false otherwise. - public bool Inject() + public void Inject() { try { var webPath = GetWebPath(); if (string.IsNullOrEmpty(webPath)) { - _logger.LogWarning("Could not find Jellyfin web path. Script injection skipped."); - return false; + _logger.LogWarning("Could not find Jellyfin web path. Script injection skipped. Attempting fallback."); + RegisterFileTransformation(); + return; } var indexPath = Path.Combine(webPath, "index.html"); if (!File.Exists(indexPath)) { - _logger.LogWarning("index.html not found at {Path}. Script injection skipped.", indexPath); - return false; + _logger.LogWarning("index.html not found at {Path}. Script injection skipped. Attempting fallback.", indexPath); + RegisterFileTransformation(); + return; } var content = File.ReadAllText(indexPath); - if (content.Contains(ScriptTag, StringComparison.Ordinal)) + if (!content.Contains(ScriptTag)) { - _logger.LogInformation("Seasonals script already injected."); - return true; + var index = content.IndexOf(Marker, StringComparison.OrdinalIgnoreCase); + if (index != -1) + { + content = content.Insert(index, ScriptTag + Environment.NewLine); + File.WriteAllText(indexPath, content); + _logger.LogInformation("Successfully injected Seasonals script into index.html."); + } + else + { + _logger.LogWarning("Script already present in index.html. Or could not be injected."); + } } - - // Insert before the closing body tag - var newContent = content.Replace(Marker, $"{ScriptTag}\n{Marker}", StringComparison.Ordinal); - if (string.Equals(newContent, content, StringComparison.Ordinal)) - { - _logger.LogWarning("Could not find closing body tag in index.html. Script injection skipped."); - return false; - } - - File.WriteAllText(indexPath, newContent); - _logger.LogInformation("Successfully injected Seasonals script into index.html."); - return true; } catch (UnauthorizedAccessException) { - _logger.LogWarning("Access was denied when attempting to inject script into index.html. Automatic injection failed. Please ensure the Jellyfin web directory is writable by the process, or manually add the script tag: {ScriptTag}", ScriptTag); - return false; + _logger.LogWarning("Unauthorized access when attempting to inject script into index.html. Automatic injection failed. Attempting fallback now..."); + RegisterFileTransformation(); } catch (Exception ex) { - _logger.LogError(ex, "Error injecting Seasonals script."); - return false; + _logger.LogError(ex, "Error injecting Seasonals script. Attempting fallback."); + RegisterFileTransformation(); } } /// /// Removes the script tag from index.html. /// - public bool Remove() + public void Remove() { + UnregisterFileTransformation(); + try { var webPath = GetWebPath(); if (string.IsNullOrEmpty(webPath)) { - return false; + return; } var indexPath = Path.Combine(webPath, "index.html"); if (!File.Exists(indexPath)) { - return false; + return; } var content = File.ReadAllText(indexPath); - if (!content.Contains(ScriptTag, StringComparison.Ordinal)) + if (content.Contains(ScriptTag)) { - return true; + content = content.Replace(ScriptTag + Environment.NewLine, "").Replace(ScriptTag, ""); + File.WriteAllText(indexPath, content); + _logger.LogInformation("Successfully removed Seasonals script from index.html."); + } else { + _logger.LogInformation("Seasonals script tag not found in index.html. No removal necessary."); } - - // Try to remove with newline first, then just the tag to ensure clean removal - var newContent = content.Replace($"{ScriptTag}\n", "", StringComparison.Ordinal) - .Replace(ScriptTag, "", StringComparison.Ordinal); - - File.WriteAllText(indexPath, newContent); - _logger.LogInformation("Successfully removed Seasonals script from index.html."); - return true; } catch (UnauthorizedAccessException) { - _logger.LogWarning("Permission denied when attempting to remove script from index.html."); - return false; + _logger.LogWarning("Unauthorized access when attempting to remove script from index.html."); } catch (Exception ex) { _logger.LogError(ex, "Error removing Seasonals script."); - return false; } } @@ -134,5 +133,76 @@ public class ScriptInjector // Use reflection to access WebPath property to ensure compatibility across different Jellyfin versions var prop = _appPaths.GetType().GetProperty("WebPath", BindingFlags.Instance | BindingFlags.Public); return prop?.GetValue(_appPaths) as string; + return prop?.GetValue(_appPaths) as string; } -} + + private void RegisterFileTransformation() + { + _logger.LogInformation("Seasonals Fallback. Registering file transformations."); + + List payloads = new List(); + + { + JObject payload = new JObject(); + payload.Add("id", "ef1e863f-cbb0-4e47-9f23-f0cbb1826ad4"); + payload.Add("fileNamePattern", "index.html"); + payload.Add("callbackAssembly", GetType().Assembly.FullName); + payload.Add("callbackClass", typeof(TransformationPatches).FullName); + payload.Add("callbackMethod", nameof(TransformationPatches.IndexHtml)); + + payloads.Add(payload); + } + + Assembly? fileTransformationAssembly = + AssemblyLoadContext.All.SelectMany(x => x.Assemblies).FirstOrDefault(x => + x.FullName?.Contains(".FileTransformation") ?? false); + + if (fileTransformationAssembly != null) + { + Type? pluginInterfaceType = fileTransformationAssembly.GetType("Jellyfin.Plugin.FileTransformation.PluginInterface"); + + if (pluginInterfaceType != null) + { + foreach (JObject payload in payloads) + { + pluginInterfaceType.GetMethod("RegisterTransformation")?.Invoke(null, new object?[] { payload }); + } + _logger.LogInformation("File transformations registered successfully."); + } + else + { + _logger.LogWarning("FileTransformation plugin found but PluginInterface type missing."); + } + } + else + { + _logger.LogWarning("FileTransformation plugin assembly not found. Fallback injection skipped."); + } + } + + private void UnregisterFileTransformation() + { + try + { + Assembly? fileTransformationAssembly = + AssemblyLoadContext.All.SelectMany(x => x.Assemblies).FirstOrDefault(x => + x.FullName?.Contains(".FileTransformation") ?? false); + + if (fileTransformationAssembly != null) + { + Type? pluginInterfaceType = fileTransformationAssembly.GetType("Jellyfin.Plugin.FileTransformation.PluginInterface"); + + if (pluginInterfaceType != null) + { + Guid id = Guid.Parse("ef1e863f-cbb0-4e47-9f23-f0cbb1826ad4"); + pluginInterfaceType.GetMethod("RemoveTransformation")?.Invoke(null, new object?[] { id }); + _logger.LogInformation("File transformation unregistered successfully."); + } + } + } + catch (Exception ex) + { + _logger.LogWarning(ex, "Error attempting to unregister file transformation. It might not have been registered."); + } + } +} \ No newline at end of file diff --git a/Jellyfin.Plugin.Seasonals/SeasonalsPlugin.cs b/Jellyfin.Plugin.Seasonals/SeasonalsPlugin.cs index f2751b5..a7c7a72 100644 --- a/Jellyfin.Plugin.Seasonals/SeasonalsPlugin.cs +++ b/Jellyfin.Plugin.Seasonals/SeasonalsPlugin.cs @@ -1,17 +1,10 @@ -using System; -using System.Collections.Generic; using System.Globalization; -using System.Linq; -using System.Reflection; -using System.Runtime.Loader; using Jellyfin.Plugin.Seasonals.Configuration; using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Plugins; using MediaBrowser.Model.Plugins; using MediaBrowser.Model.Serialization; using Microsoft.Extensions.Logging; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; namespace Jellyfin.Plugin.Seasonals; @@ -38,16 +31,11 @@ public class SeasonalsPlugin : BasePlugin, IHasWebPages if (Configuration.IsEnabled) { - if (!_scriptInjector.Inject()) - { - TryRegisterFallback(loggerFactory.CreateLogger("FileTransformationFallback")); - } + _scriptInjector.Inject(); } else { - if (!_scriptInjector.Remove()) { - TryRemoveFallback(loggerFactory.CreateLogger("FileTransformationFallback")); - } + _scriptInjector.Remove(); } } @@ -61,16 +49,11 @@ public class SeasonalsPlugin : BasePlugin, IHasWebPages { if (Configuration.IsEnabled) { - if (!_scriptInjector.Inject()) - { - TryRegisterFallback(_loggerFactory.CreateLogger("FileTransformationFallback")); - } + _scriptInjector.Inject(); } else { - if (!_scriptInjector.Remove()) { - TryRemoveFallback(_loggerFactory.CreateLogger("FileTransformationFallback")); - } + _scriptInjector.Remove(); } } } @@ -86,140 +69,7 @@ public class SeasonalsPlugin : BasePlugin, IHasWebPages /// public static SeasonalsPlugin? Instance { get; private set; } - /// - /// Callback method for FileTransformation plugin. - /// - /// The payload containing the file contents. - /// The modified file contents. - public static string TransformIndexHtml(JObject payload) - { - // CRITICAL: Always return original content if something fails or is null - string? originalContents = payload?["contents"]?.ToString(); - - if (string.IsNullOrEmpty(originalContents)) - { - return originalContents ?? string.Empty; - } - try - { - var html = originalContents; - const string scriptTag = ""; - // MARK: Remember me to remove legacy script tag support in future versions... - const string legacyScriptTag = ""; - - if (Instance?.Configuration.IsEnabled != true) - { - // Remove script if present - if (html.Contains("seasonals.js", StringComparison.Ordinal)) - { - return html.Replace(scriptTag, "", StringComparison.OrdinalIgnoreCase) - .Replace(legacyScriptTag, "", StringComparison.OrdinalIgnoreCase); - } - return html; - } - - if (!html.Contains("seasonals.js", StringComparison.Ordinal)) - { - var inject = $"{scriptTag}\n x.Assemblies) - .FirstOrDefault(x => x.FullName?.Contains(".FileTransformation") ?? false); - - if (assembly == null) - { - logger.LogWarning("FileTransformation plugin not found. Fallback injection skipped."); - return; - } - - var type = assembly.GetType("Jellyfin.Plugin.FileTransformation.PluginInterface"); - if (type == null) - { - logger.LogWarning("Jellyfin.Plugin.FileTransformation.PluginInterface not found."); - return; - } - - var method = type.GetMethod("RegisterTransformation"); - if (method == null) - { - logger.LogWarning("RegisterTransformation method not found."); - return; - } - - // Create JObject payload directly using Newtonsoft.Json - var payload = new JObject - { - { "id", Id.ToString() }, - { "fileNamePattern", "index.html" }, - { "callbackAssembly", this.GetType().Assembly.FullName }, - { "callbackClass", this.GetType().FullName }, - { "callbackMethod", nameof(TransformIndexHtml) } - }; - - // Invoke RegisterTransformation with the JObject payload - method.Invoke(null, new object[] { payload }); - logger.LogInformation("Successfully registered fallback transformation via FileTransformation plugin."); - } - catch (Exception ex) - { - logger.LogError(ex, "Error attempting to register fallback transformation."); - } - } - - private void TryRemoveFallback(ILogger logger) - { - try - { - var assembly = AssemblyLoadContext.All - .SelectMany(x => x.Assemblies) - .FirstOrDefault(x => x.FullName?.Contains(".FileTransformation") ?? false); - - if (assembly == null) - { - logger.LogWarning("FileTransformation plugin not found. Fallback removal skipped."); - return; - } - - var type = assembly.GetType("Jellyfin.Plugin.FileTransformation.PluginInterface"); - if (type == null) - { - logger.LogWarning("Jellyfin.Plugin.FileTransformation.PluginInterface not found."); - return; - } - - var method = type.GetMethod("RemoveTransformation"); - if (method == null) - { - logger.LogWarning("RemoveTransformation method not found."); - return; - } - - Guid pluginId = Id is Guid g ? g : Guid.Parse(Id.ToString()); - method.Invoke(null, new object[] { pluginId }); - logger.LogInformation("Successfully unregistered fallback transformation via FileTransformation plugin."); - } - catch (Exception ex) - { - logger.LogError(ex, "Error attempting to unregister fallback transformation."); - } - } /// public IEnumerable GetPages() diff --git a/Jellyfin.Plugin.Seasonals/bin/Release/net9.0/Jellyfin.Plugin.Seasonals.deps.json b/Jellyfin.Plugin.Seasonals/bin/Release/net9.0/Jellyfin.Plugin.Seasonals.deps.json deleted file mode 100644 index 0936c1a..0000000 --- a/Jellyfin.Plugin.Seasonals/bin/Release/net9.0/Jellyfin.Plugin.Seasonals.deps.json +++ /dev/null @@ -1,624 +0,0 @@ -{ - "runtimeTarget": { - "name": ".NETCoreApp,Version=v9.0", - "signature": "" - }, - "compilationOptions": {}, - "targets": { - ".NETCoreApp,Version=v9.0": { - "Jellyfin.Plugin.Seasonals/1.0.0.0": { - "dependencies": { - "Jellyfin.Controller": "10.11.0", - "Jellyfin.Model": "10.11.0" - }, - "runtime": { - "Jellyfin.Plugin.Seasonals.dll": {} - } - }, - "BitFaster.Caching/2.5.4": { - "runtime": { - "lib/net6.0/BitFaster.Caching.dll": { - "assemblyVersion": "2.5.4.0", - "fileVersion": "2.5.4.0" - } - } - }, - "Diacritics/4.0.17": { - "runtime": { - "lib/net9.0/Diacritics.dll": { - "assemblyVersion": "4.0.17.0", - "fileVersion": "4.0.17.0" - } - } - }, - "ICU4N/60.1.0-alpha.356": { - "dependencies": { - "J2N": "2.0.0", - "Microsoft.Extensions.Caching.Memory": "9.0.10" - }, - "runtime": { - "lib/netstandard2.0/ICU4N.dll": { - "assemblyVersion": "60.0.0.0", - "fileVersion": "60.1.0.0" - } - } - }, - "ICU4N.Transliterator/60.1.0-alpha.356": { - "dependencies": { - "ICU4N": "60.1.0-alpha.356" - }, - "runtime": { - "lib/netstandard2.0/ICU4N.Transliterator.dll": { - "assemblyVersion": "60.0.0.0", - "fileVersion": "60.1.0.0" - } - } - }, - "J2N/2.0.0": { - "runtime": { - "lib/net6.0/J2N.dll": { - "assemblyVersion": "2.0.0.0", - "fileVersion": "2.0.0.0" - } - } - }, - "Jellyfin.Common/10.11.0": { - "dependencies": { - "Jellyfin.Model": "10.11.0", - "Microsoft.Extensions.Configuration.Abstractions": "9.0.10", - "Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.10" - }, - "runtime": { - "lib/net9.0/MediaBrowser.Common.dll": { - "assemblyVersion": "10.11.0.0", - "fileVersion": "10.11.0.0" - } - } - }, - "Jellyfin.Controller/10.11.0": { - "dependencies": { - "BitFaster.Caching": "2.5.4", - "Jellyfin.Common": "10.11.0", - "Jellyfin.MediaEncoding.Keyframes": "10.11.0", - "Jellyfin.Model": "10.11.0", - "Jellyfin.Naming": "10.11.0", - "Microsoft.Extensions.Configuration.Abstractions": "9.0.10", - "Microsoft.Extensions.Configuration.Binder": "9.0.10", - "System.Threading.Tasks.Dataflow": "9.0.10" - }, - "runtime": { - "lib/net9.0/MediaBrowser.Controller.dll": { - "assemblyVersion": "10.11.0.0", - "fileVersion": "10.11.0.0" - } - } - }, - "Jellyfin.Data/10.11.0": { - "dependencies": { - "Jellyfin.Database.Implementations": "10.11.0", - "Microsoft.Extensions.Logging": "9.0.10" - }, - "runtime": { - "lib/net9.0/Jellyfin.Data.dll": { - "assemblyVersion": "10.11.0.0", - "fileVersion": "10.11.0.0" - } - } - }, - "Jellyfin.Database.Implementations/10.11.0": { - "dependencies": { - "Microsoft.EntityFrameworkCore.Relational": "9.0.10", - "Polly": "8.6.4" - }, - "runtime": { - "lib/net9.0/Jellyfin.Database.Implementations.dll": { - "assemblyVersion": "10.11.0.0", - "fileVersion": "10.11.0.0" - } - } - }, - "Jellyfin.Extensions/10.11.0": { - "dependencies": { - "Diacritics": "4.0.17", - "ICU4N.Transliterator": "60.1.0-alpha.356" - }, - "runtime": { - "lib/net9.0/Jellyfin.Extensions.dll": { - "assemblyVersion": "10.11.0.0", - "fileVersion": "10.11.0.0" - } - } - }, - "Jellyfin.MediaEncoding.Keyframes/10.11.0": { - "dependencies": { - "Microsoft.Extensions.Logging.Abstractions": "9.0.10", - "NEbml": "1.1.0.5" - }, - "runtime": { - "lib/net9.0/Jellyfin.MediaEncoding.Keyframes.dll": { - "assemblyVersion": "10.11.0.0", - "fileVersion": "10.11.0.0" - } - } - }, - "Jellyfin.Model/10.11.0": { - "dependencies": { - "Jellyfin.Data": "10.11.0", - "Jellyfin.Extensions": "10.11.0", - "Microsoft.Extensions.Logging.Abstractions": "9.0.10", - "System.Globalization": "4.3.0", - "System.Text.Json": "9.0.10" - }, - "runtime": { - "lib/net9.0/MediaBrowser.Model.dll": { - "assemblyVersion": "10.11.0.0", - "fileVersion": "10.11.0.0" - } - } - }, - "Jellyfin.Naming/10.11.0": { - "dependencies": { - "Jellyfin.Common": "10.11.0", - "Jellyfin.Model": "10.11.0" - }, - "runtime": { - "lib/net9.0/Emby.Naming.dll": { - "assemblyVersion": "10.11.0.0", - "fileVersion": "10.11.0.0" - } - } - }, - "Microsoft.EntityFrameworkCore/9.0.10": { - "dependencies": { - "Microsoft.EntityFrameworkCore.Abstractions": "9.0.10", - "Microsoft.EntityFrameworkCore.Analyzers": "9.0.10", - "Microsoft.Extensions.Caching.Memory": "9.0.10", - "Microsoft.Extensions.Logging": "9.0.10" - }, - "runtime": { - "lib/net8.0/Microsoft.EntityFrameworkCore.dll": { - "assemblyVersion": "9.0.10.0", - "fileVersion": "9.0.1025.47514" - } - } - }, - "Microsoft.EntityFrameworkCore.Abstractions/9.0.10": { - "runtime": { - "lib/net8.0/Microsoft.EntityFrameworkCore.Abstractions.dll": { - "assemblyVersion": "9.0.10.0", - "fileVersion": "9.0.1025.47514" - } - } - }, - "Microsoft.EntityFrameworkCore.Analyzers/9.0.10": {}, - "Microsoft.EntityFrameworkCore.Relational/9.0.10": { - "dependencies": { - "Microsoft.EntityFrameworkCore": "9.0.10", - "Microsoft.Extensions.Caching.Memory": "9.0.10", - "Microsoft.Extensions.Configuration.Abstractions": "9.0.10", - "Microsoft.Extensions.Logging": "9.0.10" - }, - "runtime": { - "lib/net8.0/Microsoft.EntityFrameworkCore.Relational.dll": { - "assemblyVersion": "9.0.10.0", - "fileVersion": "9.0.1025.47514" - } - } - }, - "Microsoft.Extensions.Caching.Abstractions/9.0.10": { - "dependencies": { - "Microsoft.Extensions.Primitives": "9.0.10" - }, - "runtime": { - "lib/net9.0/Microsoft.Extensions.Caching.Abstractions.dll": { - "assemblyVersion": "9.0.0.0", - "fileVersion": "9.0.1025.47515" - } - } - }, - "Microsoft.Extensions.Caching.Memory/9.0.10": { - "dependencies": { - "Microsoft.Extensions.Caching.Abstractions": "9.0.10", - "Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.10", - "Microsoft.Extensions.Logging.Abstractions": "9.0.10", - "Microsoft.Extensions.Options": "9.0.10", - "Microsoft.Extensions.Primitives": "9.0.10" - }, - "runtime": { - "lib/net9.0/Microsoft.Extensions.Caching.Memory.dll": { - "assemblyVersion": "9.0.0.0", - "fileVersion": "9.0.1025.47515" - } - } - }, - "Microsoft.Extensions.Configuration.Abstractions/9.0.10": { - "dependencies": { - "Microsoft.Extensions.Primitives": "9.0.10" - }, - "runtime": { - "lib/net9.0/Microsoft.Extensions.Configuration.Abstractions.dll": { - "assemblyVersion": "9.0.0.0", - "fileVersion": "9.0.1025.47515" - } - } - }, - "Microsoft.Extensions.Configuration.Binder/9.0.10": { - "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "9.0.10" - }, - "runtime": { - "lib/net9.0/Microsoft.Extensions.Configuration.Binder.dll": { - "assemblyVersion": "9.0.0.0", - "fileVersion": "9.0.1025.47515" - } - } - }, - "Microsoft.Extensions.DependencyInjection/9.0.10": { - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.10" - }, - "runtime": { - "lib/net9.0/Microsoft.Extensions.DependencyInjection.dll": { - "assemblyVersion": "9.0.0.0", - "fileVersion": "9.0.1025.47515" - } - } - }, - "Microsoft.Extensions.DependencyInjection.Abstractions/9.0.10": { - "runtime": { - "lib/net9.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll": { - "assemblyVersion": "9.0.0.0", - "fileVersion": "9.0.1025.47515" - } - } - }, - "Microsoft.Extensions.Logging/9.0.10": { - "dependencies": { - "Microsoft.Extensions.DependencyInjection": "9.0.10", - "Microsoft.Extensions.Logging.Abstractions": "9.0.10", - "Microsoft.Extensions.Options": "9.0.10" - }, - "runtime": { - "lib/net9.0/Microsoft.Extensions.Logging.dll": { - "assemblyVersion": "9.0.0.0", - "fileVersion": "9.0.1025.47515" - } - } - }, - "Microsoft.Extensions.Logging.Abstractions/9.0.10": { - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.10" - }, - "runtime": { - "lib/net9.0/Microsoft.Extensions.Logging.Abstractions.dll": { - "assemblyVersion": "9.0.0.0", - "fileVersion": "9.0.1025.47515" - } - } - }, - "Microsoft.Extensions.Options/9.0.10": { - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.10", - "Microsoft.Extensions.Primitives": "9.0.10" - }, - "runtime": { - "lib/net9.0/Microsoft.Extensions.Options.dll": { - "assemblyVersion": "9.0.0.0", - "fileVersion": "9.0.1025.47515" - } - } - }, - "Microsoft.Extensions.Primitives/9.0.10": { - "runtime": { - "lib/net9.0/Microsoft.Extensions.Primitives.dll": { - "assemblyVersion": "9.0.0.0", - "fileVersion": "9.0.1025.47515" - } - } - }, - "Microsoft.NETCore.Platforms/1.1.0": {}, - "Microsoft.NETCore.Targets/1.1.0": {}, - "NEbml/1.1.0.5": { - "runtime": { - "lib/netstandard2.0/NEbml.Core.dll": { - "assemblyVersion": "1.1.0.5", - "fileVersion": "1.1.0.5" - } - } - }, - "Polly/8.6.4": { - "dependencies": { - "Polly.Core": "8.6.4" - }, - "runtime": { - "lib/net6.0/Polly.dll": { - "assemblyVersion": "8.0.0.0", - "fileVersion": "8.6.4.5033" - } - } - }, - "Polly.Core/8.6.4": { - "runtime": { - "lib/net8.0/Polly.Core.dll": { - "assemblyVersion": "8.0.0.0", - "fileVersion": "8.6.4.5033" - } - } - }, - "System.Globalization/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime/4.3.0": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "System.Text.Json/9.0.10": {}, - "System.Threading.Tasks.Dataflow/9.0.10": {} - } - }, - "libraries": { - "Jellyfin.Plugin.Seasonals/1.0.0.0": { - "type": "project", - "serviceable": false, - "sha512": "" - }, - "BitFaster.Caching/2.5.4": { - "type": "package", - "serviceable": true, - "sha512": "sha512-1QroTY1PVCZOSG9FnkkCrmCKk/+bZCgI/YXq376HnYwUDJ4Ho0EaV4YaA/5v5WYLnwIwIO7RZkdWbg9pxIpueQ==", - "path": "bitfaster.caching/2.5.4", - "hashPath": "bitfaster.caching.2.5.4.nupkg.sha512" - }, - "Diacritics/4.0.17": { - "type": "package", - "serviceable": true, - "sha512": "sha512-FmMvVQRsfon+x5P+dxz4mvV8wt45xr25EAOCkuo/Cjtc7lVYV5cZUSsNXwmKQpwO+TokIHpzxb8ENpqrm4yBlQ==", - "path": "diacritics/4.0.17", - "hashPath": "diacritics.4.0.17.nupkg.sha512" - }, - "ICU4N/60.1.0-alpha.356": { - "type": "package", - "serviceable": true, - "sha512": "sha512-YMZtDnjcqWzziOKiE7w6Ma7Rl5vuFDxzOsUlHh1QyfghbNEIZQOLRs9MMfwCWAjX6n9UitrF6vLXy55Z5q+4Fg==", - "path": "icu4n/60.1.0-alpha.356", - "hashPath": "icu4n.60.1.0-alpha.356.nupkg.sha512" - }, - "ICU4N.Transliterator/60.1.0-alpha.356": { - "type": "package", - "serviceable": true, - "sha512": "sha512-lFOSO6bbEtB6HkWMNDJAq+rFwVyi9g6xVc5O/2xHa6iZnV7wLVDqCbaQ4W4vIeBSQZAafqhxciaEkmAvSdzlCg==", - "path": "icu4n.transliterator/60.1.0-alpha.356", - "hashPath": "icu4n.transliterator.60.1.0-alpha.356.nupkg.sha512" - }, - "J2N/2.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-M5bwDajAARZiyqupU+rHQJnsVLxNBOHJ8vKYHd8LcLIb1FgLfzzcJvc31Qo5Xz/GEHFjDF9ScjKL/ks/zRTXuA==", - "path": "j2n/2.0.0", - "hashPath": "j2n.2.0.0.nupkg.sha512" - }, - "Jellyfin.Common/10.11.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-TitN7+qWFt2l0V5b+KTRt7ABDCvfZdvSC6qBG1uHS18Y80xrbrSCJ9O6BH/of310h6a4lxKlQjUtTPHCzeG2AA==", - "path": "jellyfin.common/10.11.0", - "hashPath": "jellyfin.common.10.11.0.nupkg.sha512" - }, - "Jellyfin.Controller/10.11.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-WV+PQy9AHdZLvYqUsNq6ZyQoxaiaEWLz0EwZGOiu8xSrepQLFope2U1VFHVCNbARwesg7s/B+9uB03eXDsQw9w==", - "path": "jellyfin.controller/10.11.0", - "hashPath": "jellyfin.controller.10.11.0.nupkg.sha512" - }, - "Jellyfin.Data/10.11.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-YEz7/85b98Rj14IJJIVqmzJsi69LDOKo4Ox+VHbh1vj3tkWomSPayzvG3kyU8I0yFMrd6+Ta55C20kZ2XC7vQg==", - "path": "jellyfin.data/10.11.0", - "hashPath": "jellyfin.data.10.11.0.nupkg.sha512" - }, - "Jellyfin.Database.Implementations/10.11.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-oLblVZzqF9zuLMdfqp8pbusSVQq6b40/RcHjGF1hxYozVNEi+UhiDX8aJipYBOrh33FFAofoQq468BvZixpPcw==", - "path": "jellyfin.database.implementations/10.11.0", - "hashPath": "jellyfin.database.implementations.10.11.0.nupkg.sha512" - }, - "Jellyfin.Extensions/10.11.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-1ufj+Rm0Bn6C990i2wwiT5UHPZfD65GOtJK6NcDU//DDMbuoGX1LQZxuCx+rhhRg1XdHPWzYASARYyNlFQa6cg==", - "path": "jellyfin.extensions/10.11.0", - "hashPath": "jellyfin.extensions.10.11.0.nupkg.sha512" - }, - "Jellyfin.MediaEncoding.Keyframes/10.11.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-/OBcg4Qj825elOGNj5bNRfABKzfAf4qNQj0/d/DwhG/+V/wsKuxS0Pc/xOEagVVjXOnqGPZz/+k8D4UvnvMoHw==", - "path": "jellyfin.mediaencoding.keyframes/10.11.0", - "hashPath": "jellyfin.mediaencoding.keyframes.10.11.0.nupkg.sha512" - }, - "Jellyfin.Model/10.11.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-h+61RSXn4sk8fS6Zx9RkDyVnI5VnNbrsR2p8WcvybtNSW2pgU2uZ9pwEv2awD3ifX69weqYpQLMh91f6aidW2A==", - "path": "jellyfin.model/10.11.0", - "hashPath": "jellyfin.model.10.11.0.nupkg.sha512" - }, - "Jellyfin.Naming/10.11.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-2++xSbhdFSb1J3XySjC6UU+uII6OdKc0DfkYx/E1oN7mSjoftyZR8eU045kVWBwsAxr+UcMI6t2DYfES2tJkRA==", - "path": "jellyfin.naming/10.11.0", - "hashPath": "jellyfin.naming.10.11.0.nupkg.sha512" - }, - "Microsoft.EntityFrameworkCore/9.0.10": { - "type": "package", - "serviceable": true, - "sha512": "sha512-WjjxVyOTVs85V7SUe+lZjtGOEeVzF4RO8amrqL4adgbyThNq7vGCFzPw8buZj44gHeQYD5V/uZ/6XuqG9Jq+kA==", - "path": "microsoft.entityframeworkcore/9.0.10", - "hashPath": "microsoft.entityframeworkcore.9.0.10.nupkg.sha512" - }, - "Microsoft.EntityFrameworkCore.Abstractions/9.0.10": { - "type": "package", - "serviceable": true, - "sha512": "sha512-I3TWAs5Lbzmzu8S0T6qXhzBiO3CznYLrfE59W0npkqNHfWGH8CgA66LrHMWxWOXVTD4145QwYqiWNCdLwpJ1Ew==", - "path": "microsoft.entityframeworkcore.abstractions/9.0.10", - "hashPath": "microsoft.entityframeworkcore.abstractions.9.0.10.nupkg.sha512" - }, - "Microsoft.EntityFrameworkCore.Analyzers/9.0.10": { - "type": "package", - "serviceable": true, - "sha512": "sha512-mXNl0Gg3l3zGrClLCHepB+b7rYVuFfB9qQJwya0dUSHFuR1T0jMD8KxuNVyhQSfoWIepanhzjcG8TUNGXOcU0Q==", - "path": "microsoft.entityframeworkcore.analyzers/9.0.10", - "hashPath": "microsoft.entityframeworkcore.analyzers.9.0.10.nupkg.sha512" - }, - "Microsoft.EntityFrameworkCore.Relational/9.0.10": { - "type": "package", - "serviceable": true, - "sha512": "sha512-IJNrG5vdmFUvHR8FLLFg9AWpuE8qW1DTEN+fNLGbNTu6cnpZzzqU6+aknAGtTSAEVWosJ3BZ3TOO9wpifUvv3A==", - "path": "microsoft.entityframeworkcore.relational/9.0.10", - "hashPath": "microsoft.entityframeworkcore.relational.9.0.10.nupkg.sha512" - }, - "Microsoft.Extensions.Caching.Abstractions/9.0.10": { - "type": "package", - "serviceable": true, - "sha512": "sha512-cL6iTxgJ4u5zP3eFOdBiDAtmE/B2WKTRhyJfEne7n6qvHpsMwwIDxljs210mWSO1ucBy7lR1Lo7/7kjeZeLcqQ==", - "path": "microsoft.extensions.caching.abstractions/9.0.10", - "hashPath": "microsoft.extensions.caching.abstractions.9.0.10.nupkg.sha512" - }, - "Microsoft.Extensions.Caching.Memory/9.0.10": { - "type": "package", - "serviceable": true, - "sha512": "sha512-2iuzwIoCoqZJfH2VLk1xvlQS4PQDEuhj4dWiGb+Qpt1vHFHyffp497cTO6ucsV54W/h4JmM1vzDBv8pVAFazZg==", - "path": "microsoft.extensions.caching.memory/9.0.10", - "hashPath": "microsoft.extensions.caching.memory.9.0.10.nupkg.sha512" - }, - "Microsoft.Extensions.Configuration.Abstractions/9.0.10": { - "type": "package", - "serviceable": true, - "sha512": "sha512-ad3JxmFj0uxuFa1CT6oxTCC1lQ0xeRuOvzBRFT/I/ofIXVOnNsH/v2GZkAJWhlpZqKUvSexQZzp3EEAB2CdtJg==", - "path": "microsoft.extensions.configuration.abstractions/9.0.10", - "hashPath": "microsoft.extensions.configuration.abstractions.9.0.10.nupkg.sha512" - }, - "Microsoft.Extensions.Configuration.Binder/9.0.10": { - "type": "package", - "serviceable": true, - "sha512": "sha512-D6Kng+9I+w1SQPxJybc6wzw9nnnyUQPutycjtI0svv1RHaWOpUk9PPlwIRfhhoQZ3yihejkEI2wNv/7VnVtkGA==", - "path": "microsoft.extensions.configuration.binder/9.0.10", - "hashPath": "microsoft.extensions.configuration.binder.9.0.10.nupkg.sha512" - }, - "Microsoft.Extensions.DependencyInjection/9.0.10": { - "type": "package", - "serviceable": true, - "sha512": "sha512-iEtXCkNd5XhjNJAOb/wO4IhDRdLIE2CsPxZggZQWJ/q2+sa8dmEPC393nnsiqdH8/4KV8Xn25IzgKPR1UEQ0og==", - "path": "microsoft.extensions.dependencyinjection/9.0.10", - "hashPath": "microsoft.extensions.dependencyinjection.9.0.10.nupkg.sha512" - }, - "Microsoft.Extensions.DependencyInjection.Abstractions/9.0.10": { - "type": "package", - "serviceable": true, - "sha512": "sha512-r9waLiOPe9ZF1PvzUT+RDoHvpMmY8MW+lb4lqjYGObwKpnyPMLI3odVvlmshwuZcdoHynsGWOrCPA0hxZ63lIA==", - "path": "microsoft.extensions.dependencyinjection.abstractions/9.0.10", - "hashPath": "microsoft.extensions.dependencyinjection.abstractions.9.0.10.nupkg.sha512" - }, - "Microsoft.Extensions.Logging/9.0.10": { - "type": "package", - "serviceable": true, - "sha512": "sha512-UBXHqE9vyptVhaFnT1R7YJKCve7TqVI10yjjUZBNGMlW2lZ4c031Slt9hxsOzWCzlpPxxIFyf1Yk4a6Iubxx7w==", - "path": "microsoft.extensions.logging/9.0.10", - "hashPath": "microsoft.extensions.logging.9.0.10.nupkg.sha512" - }, - "Microsoft.Extensions.Logging.Abstractions/9.0.10": { - "type": "package", - "serviceable": true, - "sha512": "sha512-MFUPv/nN1rAQ19w43smm6bbf0JDYN/1HEPHoiMYY50pvDMFpglzWAuoTavByDmZq7UuhjaxwrET3joU69ZHoHQ==", - "path": "microsoft.extensions.logging.abstractions/9.0.10", - "hashPath": "microsoft.extensions.logging.abstractions.9.0.10.nupkg.sha512" - }, - "Microsoft.Extensions.Options/9.0.10": { - "type": "package", - "serviceable": true, - "sha512": "sha512-zMNABt8eBv0B0XrWjFy9nZNgddavaOeq3ZdaD5IlHhRH65MrU7HM+Hd8GjWE3e2VDGFPZFfSAc6XVXC17f9fOA==", - "path": "microsoft.extensions.options/9.0.10", - "hashPath": "microsoft.extensions.options.9.0.10.nupkg.sha512" - }, - "Microsoft.Extensions.Primitives/9.0.10": { - "type": "package", - "serviceable": true, - "sha512": "sha512-3pl8D1O5ZwMpDkZAT2uXrhQ6NipkwEgDLMFuURiHTf72TvkoMP61QYH3Vk1yrzVHnHBdNZk3cQACz8Zc7YGNhQ==", - "path": "microsoft.extensions.primitives/9.0.10", - "hashPath": "microsoft.extensions.primitives.9.0.10.nupkg.sha512" - }, - "Microsoft.NETCore.Platforms/1.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==", - "path": "microsoft.netcore.platforms/1.1.0", - "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512" - }, - "Microsoft.NETCore.Targets/1.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==", - "path": "microsoft.netcore.targets/1.1.0", - "hashPath": "microsoft.netcore.targets.1.1.0.nupkg.sha512" - }, - "NEbml/1.1.0.5": { - "type": "package", - "serviceable": true, - "sha512": "sha512-svtqDc+hue9kbnqNN2KkK4om/hDrc7K127cNb5FIYfgKgzo+JNDPXNLp8NioCchHhBO3lxWd4Cp/iiZZ3aoUqg==", - "path": "nebml/1.1.0.5", - "hashPath": "nebml.1.1.0.5.nupkg.sha512" - }, - "Polly/8.6.4": { - "type": "package", - "serviceable": true, - "sha512": "sha512-uuBsDoBw0oYrMe3uTWRjkT2sIkKh+ZZnnDrLb4Z+QANfeA4+7FJacx6E8CY5GAxXRoSgFrvUADEAQ7DPF6fGiw==", - "path": "polly/8.6.4", - "hashPath": "polly.8.6.4.nupkg.sha512" - }, - "Polly.Core/8.6.4": { - "type": "package", - "serviceable": true, - "sha512": "sha512-4AWqYnQ2TME0E+Mzovt1Uu+VyvpR84ymUldMcPw7Mbj799Phaag14CKrMtlJGx5jsvYP+S3oR1QmysgmXoD5cw==", - "path": "polly.core/8.6.4", - "hashPath": "polly.core.8.6.4.nupkg.sha512" - }, - "System.Globalization/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==", - "path": "system.globalization/4.3.0", - "hashPath": "system.globalization.4.3.0.nupkg.sha512" - }, - "System.Runtime/4.3.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==", - "path": "system.runtime/4.3.0", - "hashPath": "system.runtime.4.3.0.nupkg.sha512" - }, - "System.Text.Json/9.0.10": { - "type": "package", - "serviceable": true, - "sha512": "sha512-XM02ZBnzxk7Ti6l9YRy8Bp639wANqJzJzw4W4VYiCh+HXY9hBOWkGB4k89OLP/s/RxgM02P4a/mWcJTgFiLf1Q==", - "path": "system.text.json/9.0.10", - "hashPath": "system.text.json.9.0.10.nupkg.sha512" - }, - "System.Threading.Tasks.Dataflow/9.0.10": { - "type": "package", - "serviceable": true, - "sha512": "sha512-k1o6v6V3+4mznSnPnO0FBaRjiAPL1ouKPfPQH7hO9Z2SwJHt8E45F4wX5yQh1aeja1JHPYEungQedXibng654Q==", - "path": "system.threading.tasks.dataflow/9.0.10", - "hashPath": "system.threading.tasks.dataflow.9.0.10.nupkg.sha512" - } - } -} \ No newline at end of file diff --git a/Jellyfin.Plugin.Seasonals/bin/Release/net9.0/Jellyfin.Plugin.Seasonals.dll b/Jellyfin.Plugin.Seasonals/bin/Release/net9.0/Jellyfin.Plugin.Seasonals.dll deleted file mode 100644 index bc0cca6..0000000 Binary files a/Jellyfin.Plugin.Seasonals/bin/Release/net9.0/Jellyfin.Plugin.Seasonals.dll and /dev/null differ diff --git a/Jellyfin.Plugin.Seasonals/bin/Release/net9.0/Jellyfin.Plugin.Seasonals.pdb b/Jellyfin.Plugin.Seasonals/bin/Release/net9.0/Jellyfin.Plugin.Seasonals.pdb deleted file mode 100644 index 9881334..0000000 Binary files a/Jellyfin.Plugin.Seasonals/bin/Release/net9.0/Jellyfin.Plugin.Seasonals.pdb and /dev/null differ diff --git a/manifest.json b/manifest.json index 7c94a41..e607789 100644 --- a/manifest.json +++ b/manifest.json @@ -8,6 +8,14 @@ "category": "General", "imageUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/Jellyfin-Seasonals-Plugin/raw/branch/main/logo.png", "versions": [ + { + "version": "1.5.0.0", + "changelog": "- Refactor SeasonalsPlugin: Simplify script injection logic", + "targetAbi": "10.11.0.0", + "sourceUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/Jellyfin-Seasonals-Plugin/releases/download/v1.5.0.0/Jellyfin.Plugin.Seasonals.zip", + "checksum": "bd8d9c6af064de011a708ea85e9b08c0", + "timestamp": "2026-01-06T21:12:46Z" + }, { "version": "1.4.1.0", "changelog": "- fix fireworks display issue on scroll",