Workaround for weird lidarr album title parsing

This commit is contained in:
pcjones
2024-02-13 01:47:08 +01:00
parent 4ee55fc14a
commit 7e7ff15f75

View File

@@ -82,10 +82,9 @@ namespace UmlautAdaptarr.Services
// Ensure we trim any leading delimiters from the suffix // Ensure we trim any leading delimiters from the suffix
string suffix = originalTitle[matchEndPositionInOriginal..].TrimStart([' ', '-', '_', '.']).Trim(); string suffix = originalTitle[matchEndPositionInOriginal..].TrimStart([' ', '-', '_', '.']).Trim();
suffix = suffix.Replace("-", ".");
// Concatenate the expected title with the remaining suffix // Concatenate the expected title with the remaining suffix
var updatedTitle = $"{searchItem.ExpectedAuthor} - {searchItem.ExpectedTitle} [] {suffix}"; var updatedTitle = $"{searchItem.ExpectedAuthor} - {searchItem.ExpectedTitle}-[{suffix}]";
// Update the title element // Update the title element
titleElement.Value = updatedTitle; titleElement.Value = updatedTitle;