mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-22 22:14:44 -04:00
Add artist and year to album spec string when available
This commit is contained in:
@@ -6,7 +6,16 @@ namespace NzbDrone.Core.IndexerSearch.Definitions
|
||||
{
|
||||
public override string ToString()
|
||||
{
|
||||
return $"[{Album.Title}]";
|
||||
var baseRepresentation = $"[{Artist.Name} - {Album.Title}]";
|
||||
if (Album.ReleaseDate.HasValue)
|
||||
{
|
||||
var beforeLast = baseRepresentation.Length - 1;
|
||||
return baseRepresentation.Insert(beforeLast, $" ({Album.ReleaseDate.Value.Year})");
|
||||
}
|
||||
else
|
||||
{
|
||||
return baseRepresentation;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user