diff --git a/src/NzbDrone.Core.Test/OrganizerTests/FileNameBuilderTests/ArtistNameFirstCharacterFixture.cs b/src/NzbDrone.Core.Test/OrganizerTests/FileNameBuilderTests/ArtistNameFirstCharacterFixture.cs index 09ec27c41..2db689d61 100644 --- a/src/NzbDrone.Core.Test/OrganizerTests/FileNameBuilderTests/ArtistNameFirstCharacterFixture.cs +++ b/src/NzbDrone.Core.Test/OrganizerTests/FileNameBuilderTests/ArtistNameFirstCharacterFixture.cs @@ -42,6 +42,7 @@ namespace NzbDrone.Core.Test.OrganizerTests.FileNameBuilderTests [TestCase("¡Mucha Lucha!", "M", "¡Mucha Lucha!")] [TestCase(".hack", "H", "hack")] [TestCase("Ütopya", "U", "Ütopya")] + [TestCase("Æon Flux", "A", "Æon Flux")] public void should_get_expected_folder_name_back(string title, string parent, string child) { _artist.Name = title; diff --git a/src/NzbDrone.Core/Lidarr.Core.csproj b/src/NzbDrone.Core/Lidarr.Core.csproj index 7f0bfcd8f..93cfac1d9 100644 --- a/src/NzbDrone.Core/Lidarr.Core.csproj +++ b/src/NzbDrone.Core/Lidarr.Core.csproj @@ -4,6 +4,7 @@ + diff --git a/src/NzbDrone.Core/Organizer/FileNameBuilder.cs b/src/NzbDrone.Core/Organizer/FileNameBuilder.cs index 5b17facb5..36ec1227e 100644 --- a/src/NzbDrone.Core/Organizer/FileNameBuilder.cs +++ b/src/NzbDrone.Core/Organizer/FileNameBuilder.cs @@ -4,6 +4,7 @@ using System.Globalization; using System.IO; using System.Linq; using System.Text.RegularExpressions; +using Diacritical; using NLog; using NzbDrone.Common.Cache; using NzbDrone.Common.Disk; @@ -268,13 +269,13 @@ namespace NzbDrone.Core.Organizer { if (char.IsLetterOrDigit(title[0])) { - return title.Substring(0, 1).ToUpper().RemoveAccent(); + return title.Substring(0, 1).ToUpper().RemoveDiacritics()[0].ToString(); } // Try the second character if the first was non alphanumeric if (char.IsLetterOrDigit(title[1])) { - return title.Substring(1, 1).ToUpper().RemoveAccent(); + return title.Substring(1, 1).ToUpper().RemoveDiacritics()[0].ToString(); } // Default to "_" if no alphanumeric character can be found in the first 2 positions