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.