mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-20 21:54:25 -04:00
22 lines
601 B
C#
22 lines
601 B
C#
using System;
|
|
|
|
namespace NzbDrone.Core.IndexerSearch.Definitions
|
|
{
|
|
public class AlbumSearchCriteria : SearchCriteriaBase
|
|
{
|
|
public override string ToString()
|
|
{
|
|
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;
|
|
}
|
|
}
|
|
}
|
|
}
|