Fixed: Notifications won't show version unless its anime, will show proper
This commit is contained in:
parent
fdf210d10f
commit
adf0fc8990
|
@ -26,6 +26,21 @@ namespace NzbDrone.Core.Notifications
|
|||
|
||||
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)
|
||||
{
|
||||
var episode = episodes.First();
|
||||
|
@ -34,7 +49,7 @@ namespace NzbDrone.Core.Notifications
|
|||
series.Title,
|
||||
episode.AirDate,
|
||||
episode.Title,
|
||||
quality);
|
||||
qualityString);
|
||||
}
|
||||
|
||||
var episodeNumbers = String.Concat(episodes.Select(e => e.EpisodeNumber)
|
||||
|
@ -47,7 +62,7 @@ namespace NzbDrone.Core.Notifications
|
|||
episodes.First().SeasonNumber,
|
||||
episodeNumbers,
|
||||
episodeTitles,
|
||||
quality);
|
||||
qualityString);
|
||||
}
|
||||
|
||||
public void Handle(EpisodeGrabbedEvent message)
|
||||
|
|
|
@ -38,6 +38,7 @@ namespace NzbDrone.Core.Qualities
|
|||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
|
||||
sb.AppendFormat("v{0}", Version);
|
||||
|
||||
if (Real > 0)
|
||||
|
@ -73,32 +74,32 @@ namespace NzbDrone.Core.Qualities
|
|||
|
||||
public static bool operator >(Revision left, Revision right)
|
||||
{
|
||||
if (left == null) return false;
|
||||
if (right == null) return true;
|
||||
if (ReferenceEquals(null, left)) return false;
|
||||
if (ReferenceEquals(null, right)) return true;
|
||||
|
||||
return left.CompareTo(right) > 0;
|
||||
}
|
||||
|
||||
public static bool operator <(Revision left, Revision right)
|
||||
{
|
||||
if (left == null) return true;
|
||||
if (right == null) return false;
|
||||
if (ReferenceEquals(null, left)) return true;
|
||||
if (ReferenceEquals(null, right)) return false;
|
||||
|
||||
return left.CompareTo(right) < 0;
|
||||
}
|
||||
|
||||
public static bool operator >=(Revision left, Revision right)
|
||||
{
|
||||
if (left == null) return false;
|
||||
if (right == null) return true;
|
||||
if (ReferenceEquals(null, left)) return false;
|
||||
if (ReferenceEquals(null, right)) return true;
|
||||
|
||||
return left.CompareTo(right) >= 0;
|
||||
}
|
||||
|
||||
public static bool operator <=(Revision left, Revision right)
|
||||
{
|
||||
if (left == null) return true;
|
||||
if (right == null) return false;
|
||||
if (ReferenceEquals(null, left)) return true;
|
||||
if (ReferenceEquals(null, right)) return false;
|
||||
|
||||
return left.CompareTo(right) <= 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue