Fixes for code review

This commit is contained in:
Icer Addis 2014-01-13 21:20:29 -08:00
parent c459cdf168
commit 2dbf0ecc82
2 changed files with 7 additions and 13 deletions

View File

@ -11,18 +11,7 @@ namespace NzbDrone.Core.IndexerSearch.Definitions
public override string ToString() public override string ToString()
{ {
var sb = new StringBuilder(); return string.Format("[{0} : {1}]", SceneTitle, String.Join(",", EpisodeQueryTitles));
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());
} }
} }
} }

View File

@ -36,7 +36,12 @@ namespace NzbDrone.Core.Parser.Model
public bool IsPossibleSpecialEpisode() 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 // 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() public override string ToString()