mirror of
https://github.com/Radarr/Radarr
synced 2025-12-06 08:28:50 +01:00
Just update the TitleThe method per PR feedback
This commit is contained in:
parent
8fedf79c79
commit
24388c3c81
1 changed files with 4 additions and 9 deletions
|
|
@ -211,23 +211,18 @@ public static string CleanTitle(string title)
|
|||
return title.RemoveDiacritics();
|
||||
}
|
||||
|
||||
public static string CollectionTitleThe(string collectionTitle)
|
||||
public static string TitleThe(string title)
|
||||
{
|
||||
if (string.IsNullOrEmpty(collectionTitle))
|
||||
if (string.IsNullOrWhiteSpace(title))
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
return TitleThe(collectionTitle);
|
||||
return TitlePrefixRegex.Replace(title, "$2, $1$3");
|
||||
}
|
||||
}
|
||||
|
||||
public static string TitleThe(string title)
|
||||
{
|
||||
return TitlePrefixRegex.Replace(title, "$2, $1$3");
|
||||
}
|
||||
|
||||
public static string CleanTitleThe(string title)
|
||||
{
|
||||
if (TitlePrefixRegex.IsMatch(title))
|
||||
|
|
@ -280,7 +275,7 @@ private void AddMovieTokens(Dictionary<string, Func<TokenMatch, string>> tokenHa
|
|||
|
||||
tokenHandlers["{Movie Certification}"] = m => movie.MovieMetadata.Value.Certification ?? string.Empty;
|
||||
tokenHandlers["{Movie Collection}"] = m => Truncate(movie.MovieMetadata.Value.CollectionTitle, m.CustomFormat) ?? string.Empty;
|
||||
tokenHandlers["{Movie CollectionThe}"] = m => Truncate(CollectionTitleThe(movie.MovieMetadata.Value.CollectionTitle), m.CustomFormat) ?? string.Empty;
|
||||
tokenHandlers["{Movie CollectionThe}"] = m => Truncate(TitleThe(movie.MovieMetadata.Value.CollectionTitle), m.CustomFormat) ?? string.Empty;
|
||||
}
|
||||
|
||||
private string GetLanguageTitle(Movie movie, string isoCodes)
|
||||
|
|
|
|||
Loading…
Reference in a new issue