diff options
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 10 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs | 10 |
2 files changed, 15 insertions, 5 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index 9a2fc5a00..fa88c8e24 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -1135,8 +1135,16 @@ namespace HandBrakeWPF.ViewModels Filter = "mp4|*.mp4;*.m4v|mkv|*.mkv",
AddExtension = true,
OverwritePrompt = true,
- DefaultExt = ".mp4"
+ DefaultExt = ".mp4",
};
+ if (this.CurrentTask != null && !string.IsNullOrEmpty(this.CurrentTask.Destination))
+ {
+ if (Directory.Exists(Path.GetFullPath(this.CurrentTask.Destination)))
+ {
+ dialog.InitialDirectory = Path.GetFullPath(this.CurrentTask.Destination);
+ }
+ }
+
dialog.ShowDialog();
if (!string.IsNullOrEmpty(dialog.FileName))
diff --git a/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs index 657318f34..aaf6fa43e 100644 --- a/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs @@ -307,16 +307,18 @@ namespace HandBrakeWPF.ViewModels this.SourceTracks.FirstOrDefault(s => s.SubtitleType != SubtitleType.ForeignAudioSearch))
: null);
- if (source != null)
+ if (source == null)
{
- SubtitleTrack track = new SubtitleTrack
+ source = ForeignAudioSearchTrack;
+ }
+
+ SubtitleTrack track = new SubtitleTrack
{
SubtitleType = SubtitleType.VobSub,
SourceTrack = source,
};
- this.Task.SubtitleTracks.Add(track);
- }
+ this.Task.SubtitleTracks.Add(track);
}
/// <summary>
|