mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-17 15:02:34 +02:00
Fixed: Default to dash as separator for absolute numbers in multi-episode pattern
This commit is contained in:
parent
ea43d78ad1
commit
74e6d8c6e3
@ -657,5 +657,16 @@ public void should_allow_space_between_season_and_episode()
|
||||
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 @@ private AbsoluteEpisodeFormat[] GetAbsoluteFormat(string pattern)
|
||||
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 New Issue
Block a user