mirror of
https://github.com/lidarr/Lidarr
synced 2025-02-25 23:32:41 +00:00
Fix: Don't use scene name for tracks when track naming disabled (#646)
This commit is contained in:
parent
c8ef68283b
commit
b9cc94aa46
2 changed files with 12 additions and 2 deletions
|
@ -304,6 +304,17 @@ public void use_file_name_when_sceneName_is_null()
|
|||
.Should().Be(Path.GetFileNameWithoutExtension(_trackFile.RelativePath));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void use_file_name_when_sceneName_is_not_null()
|
||||
{
|
||||
_namingConfig.RenameTracks = false;
|
||||
_trackFile.RelativePath = "Linkin Park - 06 - Test";
|
||||
_trackFile.SceneName = "SceneName";
|
||||
|
||||
Subject.BuildTrackFileName(new List<Track> { _track1 }, _artist, _album, _trackFile)
|
||||
.Should().Be(Path.GetFileNameWithoutExtension(_trackFile.RelativePath));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void use_path_when_sceneName_and_relative_path_are_null()
|
||||
{
|
||||
|
@ -315,7 +326,6 @@ public void use_path_when_sceneName_and_relative_path_are_null()
|
|||
.Should().Be(Path.GetFileNameWithoutExtension(_trackFile.Path));
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void should_not_clean_track_title_if_there_is_only_one()
|
||||
{
|
||||
|
|
|
@ -93,7 +93,7 @@ public string BuildTrackFileName(List<Track> tracks, Artist artist, Album album,
|
|||
|
||||
if (!namingConfig.RenameTracks)
|
||||
{
|
||||
return GetOriginalTitle(trackFile);
|
||||
return GetOriginalFileName(trackFile);
|
||||
}
|
||||
|
||||
if (namingConfig.StandardTrackFormat.IsNullOrWhiteSpace())
|
||||
|
|
Loading…
Reference in a new issue