mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-26 17:57:43 +00:00
Fixed: Not being able to use MediaInfo VideoDynamicRange token to renaming options.
This commit is contained in:
parent
13c625d7c0
commit
02c64ad3a5
2 changed files with 19 additions and 0 deletions
|
@ -770,6 +770,20 @@ namespace NzbDrone.Core.Test.OrganizerTests.FileNameBuilderTests
|
|||
Mocker.GetMock<IUpdateMediaInfo>().Verify(v => v.Update(_episodeFile, _series), Times.Once());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_not_update_media_info_if_no_series_path_available()
|
||||
{
|
||||
_namingConfig.StandardEpisodeFormat =
|
||||
"{Series.Title}.S{season:00}E{episode:00}.{Episode.Title}.{MediaInfo VideoDynamicRange}";
|
||||
|
||||
GivenMediaInfoModel(schemaRevision: 3);
|
||||
_series.Path = null;
|
||||
|
||||
Subject.BuildFileName(new List<Episode> { _episode1 }, _series, _episodeFile);
|
||||
|
||||
Mocker.GetMock<IUpdateMediaInfo>().Verify(v => v.Update(_episodeFile, _series), Times.Never());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_not_update_media_info_if_token_not_configured_and_revision_is_old()
|
||||
{
|
||||
|
|
|
@ -658,6 +658,11 @@ namespace NzbDrone.Core.Organizer
|
|||
|
||||
private void UpdateMediaInfoIfNeeded(string pattern, EpisodeFile episodeFile, Series series)
|
||||
{
|
||||
if (series.Path.IsNullOrWhiteSpace())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var schemaRevision = episodeFile.MediaInfo != null ? episodeFile.MediaInfo.SchemaRevision : 0;
|
||||
var matches = TitleRegex.Matches(pattern);
|
||||
|
||||
|
|
Loading…
Reference in a new issue