<value>2.0</value>\r
</resheader>\r
<resheader name="reader">\r
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
</resheader>\r
<resheader name="writer">\r
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\r
</resheader>\r
</root>
\ No newline at end of file
/// <summary>\r
/// The Log File Header\r
/// </summary>\r
- private StringBuilder header = GeneralUtilities.CreateCliLogHeader(null);\r
+ private StringBuilder header = GeneralUtilities.CreateCliLogHeader();\r
\r
#endregion\r
\r
try\r
{\r
this.logBuffer = new StringBuilder();\r
+ this.logBuffer.AppendLine(String.Format("CLI Query: {0}", encodeQueueTask.Query));\r
+ this.logBuffer.AppendLine(String.Format("User Query: {0}", encodeQueueTask.CustomQuery));\r
+ this.logBuffer.AppendLine();\r
\r
- // Clear the current Encode Logs\r
+ // Clear the current Encode Logs)\r
if (File.Exists(logFile))\r
{\r
File.Delete(logFile);\r
}\r
\r
this.fileWriter = new StreamWriter(logFile) { AutoFlush = true };\r
- this.fileWriter.WriteLine(GeneralUtilities.CreateCliLogHeader(encodeQueueTask));\r
+ this.fileWriter.WriteLine(GeneralUtilities.CreateCliLogHeader());\r
+ this.fileWriter.WriteLine(String.Format("CLI Query: {0}", encodeQueueTask.Query));\r
+ this.fileWriter.WriteLine(String.Format("User Query: {0}", encodeQueueTask.CustomQuery));\r
+ this.fileWriter.WriteLine();\r
}\r
catch (Exception)\r
{\r
/// Scan a Source Path.\r
/// Title 0: scan all\r
/// </summary>\r
- /// <param name="sourcePath">Path to the file to scan</param>\r
- /// <param name="title">int title number. 0 for scan all</param>\r
- void Scan(string sourcePath, int title);\r
+ /// <param name="sourcePath">\r
+ /// Path to the file to scan\r
+ /// </param>\r
+ /// <param name="title">\r
+ /// int title number. 0 for scan all\r
+ /// </param>\r
+ /// <param name="previewCount">\r
+ /// The preview Count.\r
+ /// </param>\r
+ void Scan(string sourcePath, int title, int previewCount);\r
\r
/// <summary>\r
/// Kill the scan\r
/// Scan a Source Path.\r
/// Title 0: scan all\r
/// </summary>\r
- /// <param name="sourcePath">Path to the file to scan</param>\r
- /// <param name="title">int title number. 0 for scan all</param>\r
- public void Scan(string sourcePath, int title)\r
+ /// <param name="sourcePath">\r
+ /// Path to the file to scan\r
+ /// </param>\r
+ /// <param name="title">\r
+ /// int title number. 0 for scan all\r
+ /// </param>\r
+ /// <param name="previewCount">\r
+ /// The preview Count.\r
+ /// </param>\r
+ public void Scan(string sourcePath, int title, int previewCount)\r
{\r
- Thread t = new Thread(unused => this.ScanSource(sourcePath, title));\r
+ Thread t = new Thread(unused => this.ScanSource(sourcePath, title, previewCount));\r
t.Start();\r
}\r
\r
/// <summary>\r
/// Start a scan for a given source path and title\r
/// </summary>\r
- /// <param name="sourcePath">Path to the source file</param>\r
- /// <param name="title">the title number to look at</param>\r
- private void ScanSource(object sourcePath, int title)\r
+ /// <param name="sourcePath">\r
+ /// Path to the source file\r
+ /// </param>\r
+ /// <param name="title">\r
+ /// the title number to look at\r
+ /// </param>\r
+ /// <param name="previewCount">\r
+ /// The preview Count.\r
+ /// </param>\r
+ private void ScanSource(object sourcePath, int title, int previewCount)\r
{\r
try\r
{\r
+ // TODO Support Preview Count\r
+\r
IsScanning = true;\r
if (this.ScanStared != null)\r
this.ScanStared(this, new EventArgs());\r
/// <summary>\r
/// The Log File Header\r
/// </summary>\r
- StringBuilder header = GeneralUtilities.CreateCliLogHeader(null);\r
+ StringBuilder header = GeneralUtilities.CreateCliLogHeader();\r
\r
#endregion\r
\r
/// Scan a Source Path.\r
/// Title 0: scan all\r
/// </summary>\r
- /// <param name="sourcePath">Path to the file to scan</param>\r
- /// <param name="title">int title number. 0 for scan all</param>\r
- public void Scan(string sourcePath, int title)\r
+ /// <param name="sourcePath">\r
+ /// Path to the file to scan\r
+ /// </param>\r
+ /// <param name="title">\r
+ /// int title number. 0 for scan all\r
+ /// </param>\r
+ /// <param name="previewCount">\r
+ /// The preview Count.\r
+ /// </param>\r
+ public void Scan(string sourcePath, int title, int previewCount)\r
{\r
- Thread t = new Thread(unused => this.ScanSource(sourcePath, title));\r
+ Thread t = new Thread(unused => this.ScanSource(sourcePath, title, previewCount));\r
t.Start();\r
}\r
\r
/// <summary>\r
/// Start a scan for a given source path and title\r
/// </summary>\r
- /// <param name="sourcePath">Path to the source file</param>\r
- /// <param name="title">the title number to look at</param>\r
- private void ScanSource(object sourcePath, int title)\r
+ /// <param name="sourcePath">\r
+ /// Path to the source file\r
+ /// </param>\r
+ /// <param name="title">\r
+ /// the title number to look at\r
+ /// </param>\r
+ /// <param name="previewCount">\r
+ /// The preview Count.\r
+ /// </param>\r
+ private void ScanSource(object sourcePath, int title, int previewCount)\r
{\r
try\r
{\r
}\r
\r
string extraArguments = string.Empty;\r
+\r
+ if (previewCount != 10)\r
+ {\r
+ extraArguments += " --previews " + previewCount;\r
+ }\r
+\r
+\r
if (Properties.Settings.Default.DisableLibDvdNav)\r
{\r
- extraArguments = " --no-dvdnav";\r
+ extraArguments += " --no-dvdnav";\r
}\r
\r
if (title > 0)\r
// Only write the log file to disk if it's less than 100MB.\r
if (this.readData.Buffer.Length < 100000000)\r
{\r
- scanLog.WriteLine(GeneralUtilities.CreateCliLogHeader(null));\r
+ scanLog.WriteLine(GeneralUtilities.CreateCliLogHeader());\r
scanLog.Write(this.readData.Buffer);\r
this.logBuffer.AppendLine(this.readData.Buffer.ToString());\r
}\r
/// <summary>\r
/// Add the CLI Query to the Log File.\r
/// </summary>\r
- /// <param name="encJob">\r
- /// The Encode Job Object\r
- /// </param>\r
/// <returns>\r
/// The create cli log header.\r
/// </returns>\r
- public static StringBuilder CreateCliLogHeader(QueueTask encJob)\r
+ public static StringBuilder CreateCliLogHeader()\r
{\r
StringBuilder logHeader = new StringBuilder();\r
\r
logHeader.AppendLine(String.Format("Install Dir: {0}", Application.StartupPath));\r
logHeader.AppendLine(String.Format("Data Dir: {0}\n", Application.UserAppDataPath));\r
\r
- if (encJob != null)\r
- {\r
- logHeader.AppendLine(String.Format("CLI Query: {0}", encJob.Query));\r
- logHeader.AppendLine(String.Format("User Query: {0}", encJob.CustomQuery));\r
- }\r
-\r
logHeader.AppendLine("-------------------------------------------");\r
\r
return logHeader;\r
// Start the Scan\r
try\r
{\r
- SourceScan.Scan(sourcePath, title);\r
+ SourceScan.Scan(sourcePath, title, Properties.Settings.Default.previewScanCount);\r
}\r
catch (Exception exc)\r
{\r