summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Services
diff options
context:
space:
mode:
authorsr55 <[email protected]>2017-08-18 22:04:57 +0100
committersr55 <[email protected]>2017-08-18 22:04:57 +0100
commit680f04f8864999c742f071a0b1dad926104ec4fd (patch)
tree7a37edab5de29136a003a2a428f8e173979af170 /win/CS/HandBrakeWPF/Services
parent63add3c308571c1018fd1f8801100ead98e989b4 (diff)
WinGui: Improve the QueueTask Surrogate key. It now contains a session id to prevent issues with the queue reloads.
Diffstat (limited to 'win/CS/HandBrakeWPF/Services')
-rw-r--r--win/CS/HandBrakeWPF/Services/Queue/Model/QueueTask.cs12
1 files changed, 7 insertions, 5 deletions
diff --git a/win/CS/HandBrakeWPF/Services/Queue/Model/QueueTask.cs b/win/CS/HandBrakeWPF/Services/Queue/Model/QueueTask.cs
index 28e66ba59..be3a8a4b9 100644
--- a/win/CS/HandBrakeWPF/Services/Queue/Model/QueueTask.cs
+++ b/win/CS/HandBrakeWPF/Services/Queue/Model/QueueTask.cs
@@ -13,6 +13,8 @@ namespace HandBrakeWPF.Services.Queue.Model
using HandBrake.ApplicationServices.Model;
+ using HandBrakeWPF.Utilities;
+
using EncodeTask = HandBrakeWPF.Services.Encode.Model.EncodeTask;
/// <summary>
@@ -20,7 +22,7 @@ namespace HandBrakeWPF.Services.Queue.Model
/// </summary>
public class QueueTask : PropertyChangedBase
{
- private static int id = 0;
+ private static int id;
private QueueItemStatus status;
#region Properties
@@ -32,7 +34,7 @@ namespace HandBrakeWPF.Services.Queue.Model
{
this.Status = QueueItemStatus.Waiting;
id = id + 1;
- this.Id = id;
+ this.Id = string.Format("{0}.{1}", GeneralUtilities.ProcessId, id);
}
/// <summary>
@@ -55,10 +57,10 @@ namespace HandBrakeWPF.Services.Queue.Model
this.ScannedSourcePath = scannedSourcePath;
id = id + 1;
- this.Id = id;
+ this.Id = string.Format("{0}.{1}", GeneralUtilities.ProcessId, id);
}
- public int Id { get; private set; }
+ public string Id { get; }
/// <summary>
/// Gets or sets ScannedSource.
@@ -109,7 +111,7 @@ namespace HandBrakeWPF.Services.Queue.Model
public override int GetHashCode()
{
- return this.Id;
+ return this.Id.GetHashCode();
}
}
} \ No newline at end of file