mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-10 04:52:42 +01:00
SabProvider will use Series.Title instead of the series Path, it is first cleaned by MediaFileProvide.CleanName().
This commit is contained in:
parent
7ff53e5ac2
commit
3e9593ba3b
@ -271,10 +271,8 @@ public void IsInQueue_False_Error()
|
|||||||
[TestCase(1, new[] { 2, 4 }, "", QualityTypes.HDTV, true, "My Series Name - 1x2-1x4 - [HDTV] [Proper]")]
|
[TestCase(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 expected)
|
public void sab_title(int seasons, int[] episodes, string title, QualityTypes quality, bool proper, string expected)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
var series = Builder<Series>.CreateNew()
|
var series = Builder<Series>.CreateNew()
|
||||||
.With(c => c.Path = @"d:\tv shows\My Series Name")
|
.With(c => c.Title = "My Series Name")
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
var parsResult = new EpisodeParseResult()
|
var parsResult = new EpisodeParseResult()
|
||||||
@ -301,7 +299,7 @@ public void sab_season_title(bool proper, string expected)
|
|||||||
|
|
||||||
|
|
||||||
var series = Builder<Series>.CreateNew()
|
var series = Builder<Series>.CreateNew()
|
||||||
.With(c => c.Path = @"d:\tv shows\My Series Name")
|
.With(c => c.Title = "My Series Name")
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
var parsResult = new EpisodeParseResult()
|
var parsResult = new EpisodeParseResult()
|
||||||
@ -325,11 +323,9 @@ public void sab_season_title(bool proper, string expected)
|
|||||||
[TestCase(false, "My Series Name - 2011-12-01 - My Episode Title [Bluray720p]")]
|
[TestCase(false, "My Series Name - 2011-12-01 - My Episode Title [Bluray720p]")]
|
||||||
public void sab_daily_series_title(bool proper, string expected)
|
public void sab_daily_series_title(bool proper, string expected)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
var series = Builder<Series>.CreateNew()
|
var series = Builder<Series>.CreateNew()
|
||||||
.With(c => c.Path = @"d:\tv shows\My Series Name")
|
|
||||||
.With(c => c.IsDaily = true)
|
.With(c => c.IsDaily = true)
|
||||||
|
.With(c => c.Title = "My Series Name")
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
var parsResult = new EpisodeParseResult
|
var parsResult = new EpisodeParseResult
|
||||||
|
@ -108,7 +108,7 @@ public virtual String GetSabTitle(EpisodeParseResult parseResult)
|
|||||||
//Handle Full Naming
|
//Handle Full Naming
|
||||||
if (parseResult.FullSeason)
|
if (parseResult.FullSeason)
|
||||||
{
|
{
|
||||||
var seasonResult = String.Format("{0} - Season {1} [{2}]", new DirectoryInfo(parseResult.Series.Path).Name,
|
var seasonResult = String.Format("{0} - Season {1} [{2}]", MediaFileProvider.CleanFilename(parseResult.Series.Title),
|
||||||
parseResult.SeasonNumber, parseResult.Quality.QualityType);
|
parseResult.SeasonNumber, parseResult.Quality.QualityType);
|
||||||
|
|
||||||
if (parseResult.Quality.Proper)
|
if (parseResult.Quality.Proper)
|
||||||
@ -119,7 +119,7 @@ public virtual String GetSabTitle(EpisodeParseResult parseResult)
|
|||||||
|
|
||||||
if (parseResult.Series.IsDaily)
|
if (parseResult.Series.IsDaily)
|
||||||
{
|
{
|
||||||
var dailyResult = String.Format("{0} - {1:yyyy-MM-dd} - {2} [{3}]", new DirectoryInfo(parseResult.Series.Path).Name,
|
var dailyResult = String.Format("{0} - {1:yyyy-MM-dd} - {2} [{3}]", MediaFileProvider.CleanFilename(parseResult.Series.Title),
|
||||||
parseResult.AirDate, parseResult.EpisodeTitle, parseResult.Quality.QualityType);
|
parseResult.AirDate, parseResult.EpisodeTitle, parseResult.Quality.QualityType);
|
||||||
|
|
||||||
if (parseResult.Quality.Proper)
|
if (parseResult.Quality.Proper)
|
||||||
@ -139,7 +139,7 @@ public virtual String GetSabTitle(EpisodeParseResult parseResult)
|
|||||||
|
|
||||||
var epNumberString = String.Join("-", episodeString);
|
var epNumberString = String.Join("-", episodeString);
|
||||||
|
|
||||||
var result = String.Format("{0} - {1} - {2} [{3}]", new DirectoryInfo(parseResult.Series.Path).Name, epNumberString, parseResult.EpisodeTitle, parseResult.Quality.QualityType);
|
var result = String.Format("{0} - {1} - {2} [{3}]", MediaFileProvider.CleanFilename(parseResult.Series.Title), epNumberString, parseResult.EpisodeTitle, parseResult.Quality.QualityType);
|
||||||
|
|
||||||
if (parseResult.Quality.Proper)
|
if (parseResult.Quality.Proper)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user