mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-04 10:02:40 +01:00
SabTitle will return Quality in square brackets '[' or ']'
This commit is contained in:
parent
a5d9ee17bf
commit
a338b9fee5
@ -201,12 +201,12 @@ public void IsInQueue_False_Error()
|
||||
}
|
||||
|
||||
[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, 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, 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 }, "", QualityTypes.HDTV, true, "My Series Name - 1x2-1x4 - HDTV [Proper]")]
|
||||
[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 }, "", 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, 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]")]
|
||||
public void sab_title(int seasons, int[] episodes, string title, QualityTypes quality, bool proper, string excpected)
|
||||
{
|
||||
var mocker = new AutoMoqer();
|
||||
|
@ -29,9 +29,9 @@ public SabProvider(ConfigProvider configProvider, HttpProvider httpProvider)
|
||||
public virtual bool AddByUrl(string url, string title)
|
||||
{
|
||||
const string mode = "addurl";
|
||||
string cat = _configProvider.GetValue("SabTvCategory", String.Empty, true);
|
||||
string cat = _configProvider.SabTvCategory;
|
||||
//string cat = "tv";
|
||||
string priority = _configProvider.GetValue("SabTvPriority", String.Empty, false);
|
||||
string priority = _configProvider.SabTvPriority;
|
||||
string name = url.Replace("&", "%26");
|
||||
string nzbName = HttpUtility.UrlEncode(title);
|
||||
|
||||
@ -39,7 +39,7 @@ public virtual bool AddByUrl(string url, string title)
|
||||
cat, nzbName);
|
||||
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);
|
||||
Logger.Debug("Queue Repsonse: [{0}]", response);
|
||||
@ -130,7 +130,7 @@ public String GetSabTitle(EpisodeParseResult parseResult)
|
||||
|
||||
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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user