mirror of
https://github.com/Readarr/Readarr
synced 2026-02-22 14:43:14 +01:00
Fix use of empty Author SortName in filename
This commit is contained in:
parent
f3d90fdaf1
commit
f5c2a6bf51
2 changed files with 3 additions and 2 deletions
|
|
@ -240,7 +240,7 @@ private void AddAuthorTokens(Dictionary<string, Func<TokenMatch, string>> tokenH
|
|||
tokenHandlers["{Author Name}"] = m => author.Name;
|
||||
tokenHandlers["{Author CleanName}"] = m => CleanTitle(author.Name);
|
||||
tokenHandlers["{Author NameThe}"] = m => TitleThe(author.Name);
|
||||
tokenHandlers["{Author SortName}"] = m => author.Metadata.Value.NameLastFirst;
|
||||
tokenHandlers["{Author SortName}"] = m => author?.Metadata?.Value?.NameLastFirst ?? string.Empty;
|
||||
tokenHandlers["{Author NameFirstCharacter}"] = m => TitleThe(author.Name).Substring(0, 1).FirstCharToUpper();
|
||||
|
||||
if (author.Metadata.Value.Disambiguation != null)
|
||||
|
|
|
|||
|
|
@ -34,7 +34,8 @@ public FileNameSampleService(IBuildFileNames buildFileNames)
|
|||
Metadata = new AuthorMetadata
|
||||
{
|
||||
Name = "The Author Name",
|
||||
Disambiguation = "US Author"
|
||||
Disambiguation = "US Author",
|
||||
NameLastFirst = "Last name, First name"
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue