diff options
author | sr55 <[email protected]> | 2011-05-23 18:37:36 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2011-05-23 18:37:36 +0000 |
commit | 74b8080af6720f7e9befa4234d9fe0d979b39f2f (patch) | |
tree | 7772892d5997b12db86ecf20c687c8f50dcfe0c2 | |
parent | b1501dd8330ed37145bfd94d2ee4851890252429 (diff) |
WinGui: Made a change to the Query Generator to use the Scanned Source Path rather than the folder selected for batch and single file scans. Falls back to old behaviour of users selected path if said path is not available.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3998 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | win/CS/Functions/QueryGenerator.cs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/win/CS/Functions/QueryGenerator.cs b/win/CS/Functions/QueryGenerator.cs index 435624249..25003582b 100644 --- a/win/CS/Functions/QueryGenerator.cs +++ b/win/CS/Functions/QueryGenerator.cs @@ -107,16 +107,21 @@ namespace Handbrake.Functions private static string SourceQuery(frmMain mainWindow, int mode, int duration, string preview)
{
string query = string.Empty;
+ string sourcePath = string.Empty;
+
+ sourcePath = mainWindow.selectedTitle != null && File.Exists(mainWindow.selectedTitle.SourceName)
+ ? mainWindow.selectedTitle.SourceName.Trim()
+ : mainWindow.sourcePath;
if (!string.IsNullOrEmpty(mainWindow.sourcePath) && mainWindow.sourcePath.Trim() != "Select \"Source\" to continue")
{
if (mainWindow.sourcePath.EndsWith("\\"))
{
- query = " -i " + mainWindow.sourcePath;
+ query = " -i " + sourcePath;
}
else
{
- query = " -i " + '"' + mainWindow.sourcePath + '"';
+ query = " -i " + '"' + sourcePath + '"';
}
}
|