From 23772ce312e6fa5d4d602a14b6ddea5a65cddf14 Mon Sep 17 00:00:00 2001 From: ta264 Date: Wed, 9 Jun 2021 20:42:05 +0100 Subject: [PATCH] New: Author SortName token --- frontend/src/Settings/MediaManagement/Naming/NamingModal.js | 2 ++ src/NzbDrone.Core/Organizer/FileNameBuilder.cs | 1 + 2 files changed, 3 insertions(+) diff --git a/frontend/src/Settings/MediaManagement/Naming/NamingModal.js b/frontend/src/Settings/MediaManagement/Naming/NamingModal.js index 6c5841f36..7b76170eb 100644 --- a/frontend/src/Settings/MediaManagement/Naming/NamingModal.js +++ b/frontend/src/Settings/MediaManagement/Naming/NamingModal.js @@ -45,6 +45,8 @@ const authorTokens = [ { token: '{Author CleanName}', example: 'Author Name' }, + { token: '{Author SortName}', example: 'Name, Author' }, + { token: '{Author Disambiguation}', example: 'Disambiguation' } ]; diff --git a/src/NzbDrone.Core/Organizer/FileNameBuilder.cs b/src/NzbDrone.Core/Organizer/FileNameBuilder.cs index a5c53e9db..f22916558 100644 --- a/src/NzbDrone.Core/Organizer/FileNameBuilder.cs +++ b/src/NzbDrone.Core/Organizer/FileNameBuilder.cs @@ -233,6 +233,7 @@ namespace NzbDrone.Core.Organizer 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.Name.ToSortName(); if (author.Metadata.Value.Disambiguation != null) {