SabTitle will return Quality in square brackets '[' or ']'

pull/7/merge
Mark McDowall 14 years ago
parent a5d9ee17bf
commit a338b9fee5

@ -201,12 +201,12 @@ namespace NzbDrone.Core.Test
} }
[Test] [Test]
[Row(1, new[] { 2 }, "My Episode Title", QualityTypes.DVD, false, "My Series Name - 1x2 - My Episode Title DVD")] [Row(1, new[] { 2 }, "My Episode Title", QualityTypes.DVD, false, "My Series Name - 1x2 - My Episode Title [DVD]")]
[Row(1, new[] { 2 }, "My Episode Title", QualityTypes.DVD, true, "My Series Name - 1x2 - My Episode Title DVD [Proper]")] [Row(1, new[] { 2 }, "My Episode Title", QualityTypes.DVD, true, "My Series Name - 1x2 - My Episode Title [DVD] [Proper]")]
[Row(1, new[] { 2 }, "", QualityTypes.DVD, true, "My Series Name - 1x2 - DVD [Proper]")] [Row(1, new[] { 2 }, "", QualityTypes.DVD, true, "My Series Name - 1x2 - [DVD] [Proper]")]
[Row(1, new[] { 2, 4 }, "My Episode Title", QualityTypes.HDTV, false, "My Series Name - 1x2-1x4 - My Episode Title HDTV")] [Row(1, new[] { 2, 4 }, "My Episode Title", QualityTypes.HDTV, false, "My Series Name - 1x2-1x4 - My Episode Title [HDTV]")]
[Row(1, new[] { 2, 4 }, "My Episode Title", QualityTypes.HDTV, true, "My Series Name - 1x2-1x4 - My Episode Title HDTV [Proper]")] [Row(1, new[] { 2, 4 }, "My Episode Title", QualityTypes.HDTV, true, "My Series Name - 1x2-1x4 - My Episode Title [HDTV] [Proper]")]
[Row(1, new[] { 2, 4 }, "", QualityTypes.HDTV, true, "My Series Name - 1x2-1x4 - HDTV [Proper]")] [Row(1, new[] { 2, 4 }, "", QualityTypes.HDTV, true, "My Series Name - 1x2-1x4 - [HDTV] [Proper]")]
public void sab_title(int seasons, int[] episodes, string title, QualityTypes quality, bool proper, string excpected) public void sab_title(int seasons, int[] episodes, string title, QualityTypes quality, bool proper, string excpected)
{ {
var mocker = new AutoMoqer(); var mocker = new AutoMoqer();

@ -29,9 +29,9 @@ namespace NzbDrone.Core.Providers
public virtual bool AddByUrl(string url, string title) public virtual bool AddByUrl(string url, string title)
{ {
const string mode = "addurl"; const string mode = "addurl";
string cat = _configProvider.GetValue("SabTvCategory", String.Empty, true); string cat = _configProvider.SabTvCategory;
//string cat = "tv"; //string cat = "tv";
string priority = _configProvider.GetValue("SabTvPriority", String.Empty, false); string priority = _configProvider.SabTvPriority;
string name = url.Replace("&", "%26"); string name = url.Replace("&", "%26");
string nzbName = HttpUtility.UrlEncode(title); string nzbName = HttpUtility.UrlEncode(title);
@ -39,7 +39,7 @@ namespace NzbDrone.Core.Providers
cat, nzbName); cat, nzbName);
string request = GetSabRequest(action); string request = GetSabRequest(action);
Logger.Debug("Adding report [{0}] to the queue.", nzbName); Logger.Info("Adding report [{0}] to the queue.", title);
string response = _httpProvider.DownloadString(request).Replace("\n", String.Empty); string response = _httpProvider.DownloadString(request).Replace("\n", String.Empty);
Logger.Debug("Queue Repsonse: [{0}]", response); Logger.Debug("Queue Repsonse: [{0}]", response);
@ -130,7 +130,7 @@ namespace NzbDrone.Core.Providers
var epNumberString = String.Join("-", episodeString); var epNumberString = String.Join("-", episodeString);
var result = String.Format("{0} - {1} - {2} {3}", parseResult.FolderName, epNumberString, parseResult.EpisodeTitle, parseResult.Quality); var result = String.Format("{0} - {1} - {2} [{3}]", parseResult.FolderName, epNumberString, parseResult.EpisodeTitle, parseResult.Quality);
if (parseResult.Proper) if (parseResult.Proper)
{ {

Loading…
Cancel
Save