mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-26 22:46:37 -04:00
Fixed: Sort authors by lastname, firstname
This commit is contained in:
@@ -109,7 +109,6 @@ namespace NzbDrone.Core.MetadataSource.Goodreads
|
||||
Metadata = MapAuthor(resource)
|
||||
};
|
||||
author.CleanName = Parser.Parser.CleanAuthorName(author.Metadata.Value.Name);
|
||||
author.SortName = Parser.Parser.NormalizeTitle(author.Metadata.Value.Name);
|
||||
|
||||
// we can only get a rating from the author list page...
|
||||
var listResource = GetAuthorBooksPageResource(foreignAuthorId, 10, 1);
|
||||
@@ -532,6 +531,8 @@ namespace NzbDrone.Core.MetadataSource.Goodreads
|
||||
Status = resource.DiedOnDate < DateTime.UtcNow ? AuthorStatusType.Ended : AuthorStatusType.Continuing
|
||||
};
|
||||
|
||||
author.SortName = author.Name.ToSortName().ToLower();
|
||||
|
||||
if (!NoPhotoRegex.IsMatch(resource.LargeImageUrl))
|
||||
{
|
||||
author.Images.Add(new MediaCover.MediaCover
|
||||
@@ -555,6 +556,8 @@ namespace NzbDrone.Core.MetadataSource.Goodreads
|
||||
TitleSlug = resource.Id.ToString()
|
||||
};
|
||||
|
||||
author.SortName = author.Name.ToSortName().ToLower();
|
||||
|
||||
if (resource.RatingsCount.HasValue)
|
||||
{
|
||||
author.Ratings = new Ratings
|
||||
@@ -704,6 +707,7 @@ namespace NzbDrone.Core.MetadataSource.Goodreads
|
||||
{
|
||||
ForeignAuthorId = resource.BestBook.AuthorId.ToString(),
|
||||
Name = resource.BestBook.AuthorName,
|
||||
SortName = resource.BestBook.AuthorName.ToSortName().ToLower(),
|
||||
TitleSlug = resource.BestBook.AuthorId.ToString()
|
||||
}
|
||||
};
|
||||
|
||||
@@ -276,7 +276,6 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
|
||||
{
|
||||
Metadata = metadata,
|
||||
CleanName = Parser.Parser.CleanAuthorName(metadata.Name),
|
||||
SortName = Parser.Parser.NormalizeTitle(metadata.Name),
|
||||
Books = books,
|
||||
Series = series
|
||||
};
|
||||
@@ -316,6 +315,8 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
|
||||
Ratings = new Ratings { Votes = resource.RatingsCount, Value = (decimal)resource.AverageRating }
|
||||
};
|
||||
|
||||
author.SortName = author.Name.ToSortName().ToLower();
|
||||
|
||||
if (resource.ImageUrl.IsNotNullOrWhiteSpace())
|
||||
{
|
||||
author.Images.Add(new MediaCover.MediaCover
|
||||
|
||||
Reference in New Issue
Block a user