From 2dbf0ecc8240c138ddc53a9d571fa4a911ba58e0 Mon Sep 17 00:00:00 2001 From: Icer Addis Date: Mon, 13 Jan 2014 21:20:29 -0800 Subject: [PATCH] Fixes for code review --- .../Definitions/SpecialEpisodeSearchCriteria.cs | 13 +------------ src/NzbDrone.Core/Parser/Model/ParsedEpisodeInfo.cs | 7 ++++++- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/src/NzbDrone.Core/IndexerSearch/Definitions/SpecialEpisodeSearchCriteria.cs b/src/NzbDrone.Core/IndexerSearch/Definitions/SpecialEpisodeSearchCriteria.cs index d4f034e44..93bdfd0e0 100644 --- a/src/NzbDrone.Core/IndexerSearch/Definitions/SpecialEpisodeSearchCriteria.cs +++ b/src/NzbDrone.Core/IndexerSearch/Definitions/SpecialEpisodeSearchCriteria.cs @@ -11,18 +11,7 @@ public class SpecialEpisodeSearchCriteria : SearchCriteriaBase public override string ToString() { - var sb = new StringBuilder(); - bool delimiter = false; - foreach (var title in EpisodeQueryTitles) - { - if (delimiter) - { - sb.Append(','); - } - sb.Append(title); - delimiter = true; - } - return string.Format("[{0} : {1}]", SceneTitle, sb.ToString()); + return string.Format("[{0} : {1}]", SceneTitle, String.Join(",", EpisodeQueryTitles)); } } } diff --git a/src/NzbDrone.Core/Parser/Model/ParsedEpisodeInfo.cs b/src/NzbDrone.Core/Parser/Model/ParsedEpisodeInfo.cs index 2b6a808af..db7d3abb5 100644 --- a/src/NzbDrone.Core/Parser/Model/ParsedEpisodeInfo.cs +++ b/src/NzbDrone.Core/Parser/Model/ParsedEpisodeInfo.cs @@ -36,7 +36,12 @@ public bool IsAbsoluteNumbering() public bool IsPossibleSpecialEpisode() { // if we dont have eny episode numbers we are likely a special episode and need to do a search by episode title - return string.IsNullOrEmpty(AirDate) && (EpisodeNumbers.Length == 0 || SeasonNumber == 0 || String.IsNullOrWhiteSpace(SeriesTitle)); + return string.IsNullOrEmpty(AirDate) && + ( + EpisodeNumbers.Length == 0 || + SeasonNumber == 0 || + String.IsNullOrWhiteSpace(SeriesTitle) + ); } public override string ToString()