From 2c33e28d362a5c43c3edbe0400c39fdbf3b6c12e Mon Sep 17 00:00:00 2001 From: DarkFighterLuke Date: Wed, 13 Mar 2024 10:47:21 +0100 Subject: [PATCH] Fix a particular case --- Jellyfin.Plugin.TubeArchivistMetadata/Utils/Utils.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Jellyfin.Plugin.TubeArchivistMetadata/Utils/Utils.cs b/Jellyfin.Plugin.TubeArchivistMetadata/Utils/Utils.cs index 2f45da1..e898f21 100644 --- a/Jellyfin.Plugin.TubeArchivistMetadata/Utils/Utils.cs +++ b/Jellyfin.Plugin.TubeArchivistMetadata/Utils/Utils.cs @@ -20,6 +20,9 @@ namespace Jellyfin.Plugin.TubeArchivistMetadata.Utilities // Remove double slashes and spaces from the remaining part of the URL string cleanedPath = Regex.Replace(inputUrl.Substring(schemaMatch.Length), @"[/\s]+", "/"); + // Remove slashes at the start + cleanedPath = cleanedPath.TrimStart('/'); + // Add a trailing slash if not already present cleanedPath = cleanedPath.TrimEnd('/') + "/";