Fixed: Notifications won't show version unless its anime, will show proper

pull/112/head
Mark McDowall 10 years ago
parent fdf210d10f
commit adf0fc8990

@ -26,6 +26,21 @@ namespace NzbDrone.Core.Notifications
private string GetMessage(Series series, List<Episode> episodes, QualityModel quality) private string GetMessage(Series series, List<Episode> episodes, QualityModel quality)
{ {
var qualityString = quality.Quality.ToString();
if (quality.Revision.Version > 0)
{
if (series.SeriesType == SeriesTypes.Anime)
{
qualityString += " v" + quality.Revision.Version;
}
else
{
qualityString += " Proper";
}
}
if (series.SeriesType == SeriesTypes.Daily) if (series.SeriesType == SeriesTypes.Daily)
{ {
var episode = episodes.First(); var episode = episodes.First();
@ -34,7 +49,7 @@ namespace NzbDrone.Core.Notifications
series.Title, series.Title,
episode.AirDate, episode.AirDate,
episode.Title, episode.Title,
quality); qualityString);
} }
var episodeNumbers = String.Concat(episodes.Select(e => e.EpisodeNumber) var episodeNumbers = String.Concat(episodes.Select(e => e.EpisodeNumber)
@ -47,7 +62,7 @@ namespace NzbDrone.Core.Notifications
episodes.First().SeasonNumber, episodes.First().SeasonNumber,
episodeNumbers, episodeNumbers,
episodeTitles, episodeTitles,
quality); qualityString);
} }
public void Handle(EpisodeGrabbedEvent message) public void Handle(EpisodeGrabbedEvent message)

@ -38,6 +38,7 @@ namespace NzbDrone.Core.Qualities
public override string ToString() public override string ToString()
{ {
var sb = new StringBuilder(); var sb = new StringBuilder();
sb.AppendFormat("v{0}", Version); sb.AppendFormat("v{0}", Version);
if (Real > 0) if (Real > 0)
@ -73,32 +74,32 @@ namespace NzbDrone.Core.Qualities
public static bool operator >(Revision left, Revision right) public static bool operator >(Revision left, Revision right)
{ {
if (left == null) return false; if (ReferenceEquals(null, left)) return false;
if (right == null) return true; if (ReferenceEquals(null, right)) return true;
return left.CompareTo(right) > 0; return left.CompareTo(right) > 0;
} }
public static bool operator <(Revision left, Revision right) public static bool operator <(Revision left, Revision right)
{ {
if (left == null) return true; if (ReferenceEquals(null, left)) return true;
if (right == null) return false; if (ReferenceEquals(null, right)) return false;
return left.CompareTo(right) < 0; return left.CompareTo(right) < 0;
} }
public static bool operator >=(Revision left, Revision right) public static bool operator >=(Revision left, Revision right)
{ {
if (left == null) return false; if (ReferenceEquals(null, left)) return false;
if (right == null) return true; if (ReferenceEquals(null, right)) return true;
return left.CompareTo(right) >= 0; return left.CompareTo(right) >= 0;
} }
public static bool operator <=(Revision left, Revision right) public static bool operator <=(Revision left, Revision right)
{ {
if (left == null) return true; if (ReferenceEquals(null, left)) return true;
if (right == null) return false; if (ReferenceEquals(null, right)) return false;
return left.CompareTo(right) <= 0; return left.CompareTo(right) <= 0;
} }

Loading…
Cancel
Save