Fixed: Quality in notifications when file name doesn't contain the quality

pull/81/head
Mark McDowall 11 years ago
parent f214f97047
commit b4012e0752

@ -1,5 +1,4 @@
using System;
using System.Linq;
using FluentAssertions;
using NUnit.Framework;
using NzbDrone.Core.Qualities;
@ -105,6 +104,7 @@ namespace NzbDrone.Core.Test.ParserTests
[TestCase("Sonny.With.a.Chance.S02E15.720p.WEB-DL.DD5.1.H.264-SURFER", false)]
[TestCase("S07E23 - [WEBDL].mkv ", false)]
[TestCase("Fringe S04E22 720p WEB-DL DD5.1 H264-EbP.mkv", false)]
[TestCase("House.S04.720p.Web-Dl.Dd5.1.h264-P2PACK", false)]
public void should_parse_webdl720p_quality(string title, bool proper)
{
ParseAndVerifyQuality(title, Quality.WEBDL720p, proper);

@ -42,7 +42,7 @@ namespace NzbDrone.Core.Notifications
var episodeTitles = String.Join(" + ", episodes.Select(e => e.Title));
return String.Format("{0} - {1}{2} - {3} {4}",
return String.Format("{0} - {1}{2} - {3} [{4}]",
series.Title,
episodes.First().SeasonNumber,
episodeNumbers,
@ -71,7 +71,7 @@ namespace NzbDrone.Core.Notifications
public void Handle(EpisodeDownloadedEvent message)
{
var downloadMessage = new DownloadMessage();
downloadMessage.Message = GetMessage(message.Episode.Series, message.Episode.Episodes, message.Episode.ParsedEpisodeInfo.Quality);
downloadMessage.Message = GetMessage(message.Episode.Series, message.Episode.Episodes, message.Episode.Quality);
downloadMessage.Series = message.Episode.Series;
downloadMessage.EpisodeFile = message.EpisodeFile;
downloadMessage.OldFiles = message.OldFiles;

Loading…
Cancel
Save