diff --git a/src/libse/Common/WaveToVisualizer.cs b/src/libse/Common/WaveToVisualizer.cs index cc25ff12b..a3d3c3900 100644 --- a/src/libse/Common/WaveToVisualizer.cs +++ b/src/libse/Common/WaveToVisualizer.cs @@ -347,13 +347,14 @@ namespace Nikse.SubtitleEdit.Core.Common public static string GetPeakWaveFileName(string videoFileName, int trackNumber = 0) { + var dir = Configuration.WaveformsDirectory.TrimEnd(Path.DirectorySeparatorChar); + if (videoFileName != null && (videoFileName.StartsWith("http://", StringComparison.OrdinalIgnoreCase) || videoFileName.StartsWith("https://", StringComparison.OrdinalIgnoreCase))) { - return MovieHasher.GenerateHashFromString(videoFileName); + return Path.Combine(dir, $"{MovieHasher.GenerateHashFromString(videoFileName)}.wav"); } - var dir = Configuration.WaveformsDirectory.TrimEnd(Path.DirectorySeparatorChar); if (!Directory.Exists(dir)) { Directory.CreateDirectory(dir);