mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 11:12:36 +01:00
Set empty wave path for online videos in Waveforms folder
This commit is contained in:
parent
5ad9654704
commit
dd21521c21
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user