summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Services
diff options
context:
space:
mode:
authorsr55 <[email protected]>2017-03-17 21:33:51 +0000
committersr55 <[email protected]>2017-03-17 21:33:58 +0000
commit82a75bd3d9d5db5432275e9e83e1b65e7b7bdbb6 (patch)
tree79f95c5655be0821d5a4ff33f43bb3d5f471da5f /win/CS/HandBrakeWPF/Services
parentd9d6e28f2500688d7b6e0fc4b1e5396f237b99cf (diff)
WinGui: Make the Queue Storage Nightly aware. Also fix an issue with Queue and Log Files not being stored correctly for Portable mode. #267
Diffstat (limited to 'win/CS/HandBrakeWPF/Services')
-rw-r--r--win/CS/HandBrakeWPF/Services/Encode/EncodeBase.cs4
-rw-r--r--win/CS/HandBrakeWPF/Services/Queue/QueueProcessor.cs9
2 files changed, 7 insertions, 6 deletions
diff --git a/win/CS/HandBrakeWPF/Services/Encode/EncodeBase.cs b/win/CS/HandBrakeWPF/Services/Encode/EncodeBase.cs
index ed06d2cf6..0e84c3650 100644
--- a/win/CS/HandBrakeWPF/Services/Encode/EncodeBase.cs
+++ b/win/CS/HandBrakeWPF/Services/Encode/EncodeBase.cs
@@ -18,6 +18,8 @@ namespace HandBrakeWPF.Services.Encode
using HandBrake.ApplicationServices.Services.Logging;
using HandBrake.ApplicationServices.Services.Logging.Interfaces;
+ using HandBrakeWPF.Utilities;
+
using EncodeCompletedEventArgs = HandBrakeWPF.Services.Encode.EventArgs.EncodeCompletedEventArgs;
using EncodeCompletedStatus = HandBrakeWPF.Services.Encode.Interfaces.EncodeCompletedStatus;
using EncodeProgessStatus = HandBrakeWPF.Services.Encode.Interfaces.EncodeProgessStatus;
@@ -133,7 +135,7 @@ namespace HandBrakeWPF.Services.Encode
{
try
{
- string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\logs";
+ string logDir = DirectoryUtilities.GetLogDirectory();
string encodeDestinationPath = Path.GetDirectoryName(destination);
string destinationFile = Path.GetFileName(destination);
string encodeLogFile = destinationFile + " " + DateTime.Now.ToString(CultureInfo.InvariantCulture).Replace("/", "-").Replace(":", "-") + ".txt";
diff --git a/win/CS/HandBrakeWPF/Services/Queue/QueueProcessor.cs b/win/CS/HandBrakeWPF/Services/Queue/QueueProcessor.cs
index 64d2e6ec9..02a378da7 100644
--- a/win/CS/HandBrakeWPF/Services/Queue/QueueProcessor.cs
+++ b/win/CS/HandBrakeWPF/Services/Queue/QueueProcessor.cs
@@ -17,6 +17,7 @@ namespace HandBrakeWPF.Services.Queue
using System.Xml.Serialization;
using HandBrake.ApplicationServices.Model;
+ using HandBrake.ApplicationServices.Utilities;
using HandBrakeWPF.Factories;
using HandBrakeWPF.Services.Encode.Factories;
@@ -215,11 +216,10 @@ namespace HandBrakeWPF.Services.Queue
/// </param>
public void BackupQueue(string exportPath)
{
- string appDataPath = Path.Combine(
- Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), @"HandBrake\");
+ string appDataPath = DirectoryUtilities.GetUserStoragePath(VersionHelper.IsNightly());
string tempPath = !string.IsNullOrEmpty(exportPath)
? exportPath
- : appDataPath + string.Format(this.queueFile, string.Empty);
+ : Path.Combine(appDataPath, string.Format(this.queueFile, string.Empty));
using (var strm = new FileStream(tempPath, FileMode.Create, FileAccess.Write))
{
@@ -416,8 +416,7 @@ namespace HandBrakeWPF.Services.Queue
/// </param>
public void RestoreQueue(string importPath)
{
- string appDataPath = Path.Combine(
- Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), @"HandBrake\");
+ string appDataPath = DirectoryUtilities.GetUserStoragePath(VersionHelper.IsNightly());
string tempPath = !string.IsNullOrEmpty(importPath)
? importPath
: (appDataPath + string.Format(this.queueFile, string.Empty));