Fixed: SampleRate Format doesn't include decimal

pull/780/head
Qstick 6 years ago
parent b0faaef777
commit d71f7e5d35

@ -375,7 +375,7 @@ namespace NzbDrone.Core.Test.OrganizerTests.FileNameBuilderTests
_namingConfig.StandardTrackFormat = "{MediaInfo AudioSampleRate}";
Subject.BuildTrackFileName(new List<Track> { _track1 }, _artist, _album, _trackFile)
.Should().Be("44kHz");
.Should().Be("44.1kHz");
}
[Test]

@ -24,7 +24,7 @@ namespace NzbDrone.Core.MediaFiles
public static string FormatAudioSampleRate(MediaInfoModel mediaInfo)
{
return $"{mediaInfo.AudioSampleRate / 1000:0.#}kHz";
return $"{(double)mediaInfo.AudioSampleRate / 1000:0.#}kHz";
}
public static decimal FormatAudioChannels(MediaInfoModel mediaInfo)

Loading…
Cancel
Save