Files
ersatztv/ErsatzTV.Core/Metadata/SortTitle.cs
T
Jason DoveandGitHub 9479806cb0 scanner refactoring and other cleanup (#1082)
* move subtitles provider into scanner

* move more stuff into scanner

* move nfo into scanner

* add scan subcommand

* fix a bunch of nfo build warnings

* more subcommands

* fix warnings

* cleanup logging

* remove unused code

* cleanup old ffmpeg stuff

* rename complex filter

* refactor wrapped segmenter
2022-12-31 10:57:20 -06:00

35 lines
725 B
C#

namespace ErsatzTV.Core.Metadata;
public static class SortTitle
{
public static string GetSortTitle(string title)
{
if (string.IsNullOrWhiteSpace(title))
{
return title;
}
if (title.StartsWith("the ", StringComparison.OrdinalIgnoreCase))
{
return title[4..];
}
if (title.StartsWith("a ", StringComparison.OrdinalIgnoreCase))
{
return title[2..];
}
if (title.StartsWith("an ", StringComparison.OrdinalIgnoreCase))
{
return title[3..];
}
if (title.StartsWith("Æ"))
{
return title.Replace("Æ", "E");
}
return title;
}
}