summaryrefslogtreecommitdiffstats
path: root/win/CS
diff options
context:
space:
mode:
authorsr55 <[email protected]>2019-05-04 20:06:57 +0100
committersr55 <[email protected]>2019-05-04 20:06:57 +0100
commita9e2e3aeeb366533af5ea510a1614826651a6128 (patch)
tree6e2887928510f50d550e8e7e8d79307810fb591c /win/CS
parenta5590df406bf2c6d023eed53268dd14a8f5b5fc7 (diff)
WinGui: Allow SSA files to be dropped on the UI.
Diffstat (limited to 'win/CS')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
index 6e9956645..d39975244 100644
--- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
@@ -1716,7 +1716,7 @@ namespace HandBrakeWPF.ViewModels
string[] fileNames = e.Data.GetData(DataFormats.FileDrop, true) as string[];
if (fileNames != null && fileNames.Any() && (File.Exists(fileNames[0]) || Directory.Exists(fileNames[0])))
{
- string videoContent = fileNames.FirstOrDefault(f => Path.GetExtension(f)?.ToLower() != ".srt");
+ string videoContent = fileNames.FirstOrDefault(f => Path.GetExtension(f)?.ToLower() != ".srt" && Path.GetExtension(f)?.ToLower() != ".ssa");
if (!string.IsNullOrEmpty(videoContent))
{
this.StartScan(videoContent, 0);
@@ -1730,10 +1730,11 @@ namespace HandBrakeWPF.ViewModels
Resources.Error,
MessageBoxButton.OK,
MessageBoxImage.Error);
+ return;
}
// StartScan is not synchronous, so for now we don't support adding both srt and video file at the same time.
- string[] subtitleFiles = fileNames.Where(f => Path.GetExtension(f)?.ToLower() == ".srt").ToArray();
+ string[] subtitleFiles = fileNames.Where(f => Path.GetExtension(f)?.ToLower() == ".srt" || Path.GetExtension(f)?.ToLower() == ".ssa").ToArray();
if (subtitleFiles.Any())
{
this.SwitchTab(5);