Fix separator being added twice

This commit is contained in:
pcjones
2024-02-23 14:08:56 +01:00
parent dbac09bf36
commit ff051569ca

View File

@@ -221,7 +221,7 @@ namespace UmlautAdaptarr.Services
*/ */
// Construct the new title with the original suffix // Construct the new title with the original suffix
var newTitle = newTitlePrefix + (string.IsNullOrEmpty(suffix) ? "" : separator + suffix); var newTitle = newTitlePrefix + (string.IsNullOrEmpty(suffix) ? "" : suffix.StartsWith(separator) ? suffix : $"{separator}{suffix}");
// Update the title element's value with the new title // Update the title element's value with the new title
//titleElement.Value = newTitle + $"({originalTitle.Substring(0, variationLength)})"; //titleElement.Value = newTitle + $"({originalTitle.Substring(0, variationLength)})";