diff options
author | sr55 <[email protected]> | 2011-06-15 17:45:06 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2011-06-15 17:45:06 +0000 |
commit | b957ee1aaba01b06d9f8b3f26e0385eba061baf2 (patch) | |
tree | 6ca577f1f7cb978c1311b444be9bcac5da4ad373 /win/CS/HandBrake.ApplicationServices/Services/ScanService.cs | |
parent | 4d7216fba8652a83821be49cd16cc851b5cc4cd2 (diff) |
WinGui:
- Correctly set the number of previews to generate during Scan
- Fix an issue where the CLI query is not printed to the log window.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4061 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Services/ScanService.cs')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Services/ScanService.cs | 41 |
1 files changed, 31 insertions, 10 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/ScanService.cs b/win/CS/HandBrake.ApplicationServices/Services/ScanService.cs index b4b2c7484..84d2a53d5 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/ScanService.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/ScanService.cs @@ -42,7 +42,7 @@ namespace HandBrake.ApplicationServices.Services /// <summary>
/// The Log File Header
/// </summary>
- StringBuilder header = GeneralUtilities.CreateCliLogHeader(null);
+ StringBuilder header = GeneralUtilities.CreateCliLogHeader();
#endregion
@@ -104,11 +104,18 @@ namespace HandBrake.ApplicationServices.Services /// Scan a Source Path.
/// Title 0: scan all
/// </summary>
- /// <param name="sourcePath">Path to the file to scan</param>
- /// <param name="title">int title number. 0 for scan all</param>
- public void Scan(string sourcePath, int title)
+ /// <param name="sourcePath">
+ /// Path to the file to scan
+ /// </param>
+ /// <param name="title">
+ /// int title number. 0 for scan all
+ /// </param>
+ /// <param name="previewCount">
+ /// The preview Count.
+ /// </param>
+ public void Scan(string sourcePath, int title, int previewCount)
{
- Thread t = new Thread(unused => this.ScanSource(sourcePath, title));
+ Thread t = new Thread(unused => this.ScanSource(sourcePath, title, previewCount));
t.Start();
}
@@ -142,9 +149,16 @@ namespace HandBrake.ApplicationServices.Services /// <summary>
/// Start a scan for a given source path and title
/// </summary>
- /// <param name="sourcePath">Path to the source file</param>
- /// <param name="title">the title number to look at</param>
- private void ScanSource(object sourcePath, int title)
+ /// <param name="sourcePath">
+ /// Path to the source file
+ /// </param>
+ /// <param name="title">
+ /// the title number to look at
+ /// </param>
+ /// <param name="previewCount">
+ /// The preview Count.
+ /// </param>
+ private void ScanSource(object sourcePath, int title, int previewCount)
{
try
{
@@ -170,9 +184,16 @@ namespace HandBrake.ApplicationServices.Services }
string extraArguments = string.Empty;
+
+ if (previewCount != 10)
+ {
+ extraArguments += " --previews " + previewCount;
+ }
+
+
if (Properties.Settings.Default.DisableLibDvdNav)
{
- extraArguments = " --no-dvdnav";
+ extraArguments += " --no-dvdnav";
}
if (title > 0)
@@ -210,7 +231,7 @@ namespace HandBrake.ApplicationServices.Services // Only write the log file to disk if it's less than 100MB.
if (this.readData.Buffer.Length < 100000000)
{
- scanLog.WriteLine(GeneralUtilities.CreateCliLogHeader(null));
+ scanLog.WriteLine(GeneralUtilities.CreateCliLogHeader());
scanLog.Write(this.readData.Buffer);
this.logBuffer.AppendLine(this.readData.Buffer.ToString());
}
|