From 40cfd4ba63cf24d49526730cd3b70e755198ca5f Mon Sep 17 00:00:00 2001 From: Skyler Shaw Date: Wed, 26 Aug 2026 05:27:02 -0700 Subject: [PATCH] Treat main and latest as embedded, drop the unreachable 10.11 fallback An "embedded" default only helps fresh installs: every existing server has "main" or "latest" saved and would keep fetching a moving branch ref forever. Those values never named a version, they meant "newest", and the newest that matches the installed plugin is now the embedded copy. A tag or commit still resolves to jsDelivr. This makes the 10.11 fallback unreachable ("main" resolves to embedded before the guard), and it was already dead: it compares JellyfinVersionAttribute.GetVersion() to "10.11" by equality while the assembly declares "10.11.2". Remove it, along with the config page's client-side copy of the latest-to-main rewrite. --- .../Configuration/PluginConfiguration.cs | 12 ++++++++++++ .../Configuration/config.html | 6 +----- .../Helpers/TransformationPatches.cs | 17 ++--------------- 3 files changed, 15 insertions(+), 20 deletions(-) diff --git a/src/Jellyfin.Plugin.MediaBar/Configuration/PluginConfiguration.cs b/src/Jellyfin.Plugin.MediaBar/Configuration/PluginConfiguration.cs index 13a7dd4..c6478fa 100644 --- a/src/Jellyfin.Plugin.MediaBar/Configuration/PluginConfiguration.cs +++ b/src/Jellyfin.Plugin.MediaBar/Configuration/PluginConfiguration.cs @@ -16,6 +16,18 @@ namespace Jellyfin.Plugin.MediaBar.Configuration public string VersionString { get; set; } = EmbeddedVersion; + public static bool UsesEmbeddedAssets(string? version) + { + version = version?.Trim(); + + // main/latest predate the embedded assets; configs that saved them meant + // "newest", which is now the embedded copy + return string.IsNullOrWhiteSpace(version) || + string.Equals(version, EmbeddedVersion, StringComparison.OrdinalIgnoreCase) || + string.Equals(version, "main", StringComparison.OrdinalIgnoreCase) || + string.Equals(version, "latest", StringComparison.OrdinalIgnoreCase); + } + public bool UseAvatarsFile { get; set; } = true; public string AvatarsPlaylist { get; set; } = string.Empty; diff --git a/src/Jellyfin.Plugin.MediaBar/Configuration/config.html b/src/Jellyfin.Plugin.MediaBar/Configuration/config.html index 5bff541..ca8bb43 100644 --- a/src/Jellyfin.Plugin.MediaBar/Configuration/config.html +++ b/src/Jellyfin.Plugin.MediaBar/Configuration/config.html @@ -37,7 +37,7 @@ -
Where the web assets are loaded from. Leave as embedded to serve the copies shipped inside this plugin, which always match the installed version and need no internet access. Set a git ref (branch, tag or commit) to load that version from jsDelivr instead.
+
Where the web assets are loaded from. embedded (also main, latest, or blank) serves the copies shipped inside this plugin, which always match the installed version and need no internet access. Set a tag or commit to load that exact version from jsDelivr instead.