mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-04-25 06:47:09 -04:00
Fixed: Don't reject import with missing episode title if renaming is off
This commit is contained in:
parent
600b5cfa8e
commit
beea02cea9
2 changed files with 12 additions and 0 deletions
|
@ -46,6 +46,13 @@ namespace NzbDrone.Core.Test.OrganizerTests.FileNameBuilderTests
|
||||||
Subject.RequiresEpisodeTitle(_series, new List<Episode> { _episode }).Should().BeFalse();
|
Subject.RequiresEpisodeTitle(_series, new List<Episode> { _episode }).Should().BeFalse();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void should_return_false_if_renaming_episodes_is_off()
|
||||||
|
{
|
||||||
|
_namingConfig.RenameEpisodes = false;
|
||||||
|
Subject.RequiresEpisodeTitle(_series, new List<Episode> { _episode }).Should().BeFalse();
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void should_return_true_when_episode_title_is_part_of_the_pattern()
|
public void should_return_true_when_episode_title_is_part_of_the_pattern()
|
||||||
{
|
{
|
||||||
|
|
|
@ -332,6 +332,11 @@ namespace NzbDrone.Core.Organizer
|
||||||
var namingConfig = _namingConfigService.GetConfig();
|
var namingConfig = _namingConfigService.GetConfig();
|
||||||
var pattern = namingConfig.StandardEpisodeFormat;
|
var pattern = namingConfig.StandardEpisodeFormat;
|
||||||
|
|
||||||
|
if (!namingConfig.RenameEpisodes)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (series.SeriesType == SeriesTypes.Daily)
|
if (series.SeriesType == SeriesTypes.Daily)
|
||||||
{
|
{
|
||||||
pattern = namingConfig.DailyEpisodeFormat;
|
pattern = namingConfig.DailyEpisodeFormat;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue