summaryrefslogtreecommitdiffstats
path: root/win/C#/Functions
diff options
context:
space:
mode:
authorsr55 <[email protected]>2008-09-09 16:48:33 +0000
committersr55 <[email protected]>2008-09-09 16:48:33 +0000
commit57dc995028ba55fb514d29855bf0e01f1903791b (patch)
treeaf53fdbaa3ec1dd3567d5e29008845974b464258 /win/C#/Functions
parent38340006c9205d3fe61fa8e4bad54afcac64d282 (diff)
WinGui:
- Allow users to manually import / export the queue. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1682 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Functions')
-rw-r--r--win/C#/Functions/Queue.cs16
1 files changed, 12 insertions, 4 deletions
diff --git a/win/C#/Functions/Queue.cs b/win/C#/Functions/Queue.cs
index dc2345358..d6c7978de 100644
--- a/win/C#/Functions/Queue.cs
+++ b/win/C#/Functions/Queue.cs
@@ -101,11 +101,15 @@ namespace Handbrake.Functions
/// Writes the current queue to disk. hb_queue_recovery.dat
/// This function is called after getNextItemForEncoding()
/// </summary>
- public void write2disk()
+ public void write2disk(string file)
{
try
{
- string tempPath = Path.Combine(Path.GetTempPath(), "hb_queue_recovery.dat");
+ string tempPath = "";
+ if (file == "hb_queue_recovery.dat")
+ tempPath = Path.Combine(Path.GetTempPath(), "hb_queue_recovery.dat");
+ else
+ tempPath = file;
using (StreamWriter writer = new StreamWriter(tempPath))
{
foreach (string item in queue)
@@ -125,11 +129,15 @@ namespace Handbrake.Functions
/// <summary>
/// Recover the queue from hb_queue_recovery.dat
/// </summary>
- public void recoverQueue()
+ public void recoverQueue(string file)
{
try
{
- string tempPath = Path.Combine(Path.GetTempPath(), "hb_queue_recovery.dat");
+ string tempPath = "";
+ if (file == "hb_queue_recovery.dat")
+ tempPath = Path.Combine(Path.GetTempPath(), "hb_queue_recovery.dat");
+ else
+ tempPath = file;
using (StreamReader reader = new StreamReader(tempPath))
{
string queue_item = reader.ReadLine();