diff options
author | sr55 <[email protected]> | 2019-06-07 19:55:56 +0100 |
---|---|---|
committer | sr55 <[email protected]> | 2019-06-07 19:56:17 +0100 |
commit | 1c88dbe1af5b6c29dc88626dc34e746936f49fe6 (patch) | |
tree | 510f4f3d051a4e9ff3c9fc73bb82a8fc2d7afb7d /win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs | |
parent | 703fbc82f6c1d25ec9df123d4257953279e3e8a3 (diff) |
WinGui: Re-implement queue import/export functionality for the GUI. Note, this is incompatible with the CLI Queue parser. There is an existing separate option for exporting into a CLI friendly JSON format.
Format subject to change in the future. For now, this is a quick way of getting this functionality back. #898
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs index 15602f79d..0415a8c95 100644 --- a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs @@ -497,10 +497,7 @@ namespace HandBrakeWPF.ViewModels this.queueProcessor.Start(userSettingService.GetUserSetting<bool>(UserSettingConstants.ClearCompletedFromQueue));
}
- /// <summary>
- /// Export the Queue to a file.
- /// </summary>
- public void Export()
+ public void ExportCli()
{
SaveFileDialog dialog = new SaveFileDialog
{
@@ -512,13 +509,26 @@ namespace HandBrakeWPF.ViewModels if (dialog.ShowDialog() == true)
{
+ this.queueProcessor.ExportCliJson(dialog.FileName);
+ }
+ }
+
+ public void Export()
+ {
+ SaveFileDialog dialog = new SaveFileDialog
+ {
+ Filter = "Json (*.json)|*.json",
+ OverwritePrompt = true,
+ DefaultExt = ".json",
+ AddExtension = true
+ };
+
+ if (dialog.ShowDialog() == true)
+ {
this.queueProcessor.ExportJson(dialog.FileName);
}
}
- /// <summary>
- /// Import a saved queue
- /// </summary>
public void Import()
{
OpenFileDialog dialog = new OpenFileDialog { Filter = "Json (*.json)|*.json", CheckFileExists = true };
@@ -558,7 +568,6 @@ namespace HandBrakeWPF.ViewModels public void OpenSourceDir()
{
this.OpenSourceDirectory(this.SelectedTask);
-
}
public void OpenDestDir()
|