mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-27 02:07:41 +00:00
Fixed: Default to dash as separator for absolute numbers in multi-episode pattern
This commit is contained in:
parent
ea43d78ad1
commit
74e6d8c6e3
2 changed files with 12 additions and 1 deletions
|
@ -657,5 +657,16 @@ namespace NzbDrone.Core.Test.OrganizerTests
|
|||
Subject.BuildFileName(new List<Episode> { _episode1 }, _series, _episodeFile)
|
||||
.Should().Be("South Park - S15 E06 - City Sushi");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_default_to_dash_when_serparator_is_not_set_for_absolute_number()
|
||||
{
|
||||
_series.SeriesType = SeriesTypes.Anime;
|
||||
_namingConfig.MultiEpisodeStyle = (int)MultiEpisodeStyle.Duplicate;
|
||||
_namingConfig.AnimeEpisodeFormat = "{Series Title} - {season}x{episode:00} - [{absolute:000}] - {Episode Title} - {Quality Title}";
|
||||
|
||||
Subject.BuildFileName(new List<Episode> { _episode1, _episode2 }, _series, _episodeFile)
|
||||
.Should().Be("South Park - 15x06 - 15x07 - [100-101] - City Sushi - HDTV-720p");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -626,7 +626,7 @@ namespace NzbDrone.Core.Organizer
|
|||
return _absoluteEpisodeFormatCache.Get(pattern, () => AbsoluteEpisodePatternRegex.Matches(pattern).OfType<Match>()
|
||||
.Select(match => new AbsoluteEpisodeFormat
|
||||
{
|
||||
Separator = match.Groups["separator"].Value,
|
||||
Separator = match.Groups["separator"].Value.IsNotNullOrWhiteSpace() ? match.Groups["separator"].Value : "-",
|
||||
AbsoluteEpisodePattern = match.Groups["absolute"].Value
|
||||
}).ToArray());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue