]> granicus.if.org Git - handbrake/commitdiff
WinGui: Change the status bar to show when it's doing a subtitle scan.
authorsr55 <sr55.hb@outlook.com>
Thu, 22 Dec 2016 21:13:55 +0000 (21:13 +0000)
committersr55 <sr55.hb@outlook.com>
Thu, 22 Dec 2016 21:13:55 +0000 (21:13 +0000)
win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
win/CS/HandBrakeWPF/Properties/Resources.resx
win/CS/HandBrakeWPF/Services/Encode/EventArgs/EncodeProgressEventArgs.cs
win/CS/HandBrakeWPF/Services/Encode/LibEncode.cs
win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs

index 465a52b2a0c7f42c37b18e5daf055506646602a9..54a401bf49392792c24c0c62b37cc370cc1c3a58 100644 (file)
@@ -712,7 +712,7 @@ namespace HandBrakeWPF.Properties {
         }\r
         \r
         /// <summary>\r
-        ///   Looks up a localized string similar to    Pending Jobs {7}.\r
+        ///   Looks up a localized string similar to    Pending Jobs {0}.\r
         /// </summary>\r
         public static string Main_JobsPending_addon {\r
             get {\r
@@ -1090,7 +1090,7 @@ namespace HandBrakeWPF.Properties {
         }\r
         \r
         /// <summary>\r
-        ///   Looks up a localized string similar to Encoding: Pass {0} of {1},  {2:00.00}%, FPS: {3:000.0},  Avg FPS: {4:000.0},  Time Remaining: {5},  Elapsed: {6:d\:hh\:mm\:ss}.\r
+        ///   Looks up a localized string similar to Encoding: Pass {0} of {1},  {2:00.00}%, FPS: {3:000.0},  Avg FPS: {4:000.0},  Time Remaining: {5},  Elapsed: {6:d\:hh\:mm\:ss} {7}.\r
         /// </summary>\r
         public static string MainViewModel_EncodeStatusChanged_StatusLabel {\r
             get {\r
@@ -1098,6 +1098,15 @@ namespace HandBrakeWPF.Properties {
             }\r
         }\r
         \r
+        /// <summary>\r
+        ///   Looks up a localized string similar to Processing Pass {0} of {1}, (Subtitle Scan)  {2:00.00}%, Scan Time Remaining: {3},  Elapsed: {4:d\:hh\:mm\:ss}.\r
+        /// </summary>\r
+        public static string MainViewModel_EncodeStatusChanged_SubScan_StatusLabel {\r
+            get {\r
+                return ResourceManager.GetString("MainViewModel_EncodeStatusChanged_SubScan_StatusLabel", resourceCulture);\r
+            }\r
+        }\r
+        \r
         /// <summary>\r
         ///   Looks up a localized string similar to Low Disk Space.\r
         /// </summary>\r
index c4b66797aea376451637d2f36dcd1ad835e4ab0b..161b55a8f8a793ba92f83c3ba2e4699df1beb362 100644 (file)
@@ -355,7 +355,7 @@ In order to use the QuickSync encoder, you must:
     <value>There are jobs on the queue with the same destination path. Please choose a different path for this job.</value>\r
   </data>\r
   <data name="Main_JobsPending_addon" xml:space="preserve">\r
-    <value>   Pending Jobs {7}</value>\r
+    <value>   Pending Jobs {0}</value>\r
   </data>\r
   <data name="Main_NewDefaultPreset" xml:space="preserve">\r
     <value>New Default Preset Set: {0}</value>\r
@@ -548,7 +548,7 @@ The Activity log may have further information.</value>
     <value>Are you sure you want to delete the preset: </value>\r
   </data>\r
   <data name="MainViewModel_EncodeStatusChanged_StatusLabel" xml:space="preserve">\r
-    <value>Encoding: Pass {0} of {1},  {2:00.00}%, FPS: {3:000.0},  Avg FPS: {4:000.0},  Time Remaining: {5},  Elapsed: {6:d\:hh\:mm\:ss}</value>\r
+    <value>Encoding: Pass {0} of {1},  {2:00.00}%, FPS: {3:000.0},  Avg FPS: {4:000.0},  Time Remaining: {5},  Elapsed: {6:d\:hh\:mm\:ss} {7}</value>\r
   </data>\r
   <data name="AddPresetViewModel_PresetMustProvideName" xml:space="preserve">\r
     <value>A Preset must have a Name. Please fill out the Preset Name field.</value>\r
@@ -825,4 +825,7 @@ Your preset file will be archived and new one created. You will need to re-creat
   <data name="MainViewModel_UnableToLaunchDestDirSolution" xml:space="preserve">\r
     <value>Please check that you have a valid destination directory.</value>\r
   </data>\r
+  <data name="MainViewModel_EncodeStatusChanged_SubScan_StatusLabel" xml:space="preserve">\r
+    <value>Processing Pass {0} of {1}, (Subtitle Scan)  {2:00.00}%, Scan Time Remaining: {3},  Elapsed: {4:d\:hh\:mm\:ss}</value>\r
+  </data>\r
 </root>
\ No newline at end of file
index 5d3d12791cb590d6a200e08decc545bee29faf96..940be6568daa52f30de089482c0bac6535ac0134 100644 (file)
@@ -59,5 +59,16 @@ namespace HandBrakeWPF.Services.Encode.EventArgs
         /// </summary>
         [DataMember]
         public TimeSpan ElapsedTime { get; set; }
+
+        /// <summary>
+        ///  Gets or sets PassId.
+        /// </summary>
+        /// <remarks>
+        /// -1: Subtitle scan
+        ///  0: Encode
+        ///  1: Encode first pass
+        ///  2: Encode second pass
+        /// </remarks>
+        public int PassId { get; set; }
     }
 }
index ec0680fb12e03f5f38ea15fc74a24877582751d5..58505659bed9941c62ece30a44d66b4ba5f92849 100644 (file)
@@ -169,6 +169,7 @@ namespace HandBrakeWPF.Services.Encode
                 Task = e.Pass, 
                 TaskCount = e.PassCount,
                 ElapsedTime = DateTime.Now - this.startTime, 
+                PassId = e.PassId
             };
 
             this.InvokeEncodeStatusChanged(args);
index 359301296691de39e35831d09717cc057a69270e..9f7ad8cb3cf4beec422f6a7f84937b85960dc79a 100644 (file)
@@ -2339,16 +2339,30 @@ namespace HandBrakeWPF.ViewModels
                 {\r
                     if (this.queueProcessor.EncodeService.IsEncoding)\r
                     {\r
-                        this.ProgramStatusLabel =\r
-                            string.Format(Resources.MainViewModel_EncodeStatusChanged_StatusLabel + Resources.Main_JobsPending_addon,\r
+                        string jobsPending = string.Format(Resources.Main_JobsPending_addon, this.queueProcessor.Count);\r
+                        if (e.PassId == -1)\r
+                        {\r
+                            this.ProgramStatusLabel = string.Format(Resources.MainViewModel_EncodeStatusChanged_SubScan_StatusLabel,\r
+                                e.Task,\r
+                                e.TaskCount,\r
+                                e.PercentComplete,\r
+                                e.EstimatedTimeLeft,\r
+                                e.ElapsedTime,\r
+                                jobsPending);\r
+                        }\r
+                        else\r
+                        {\r
+                            this.ProgramStatusLabel =\r
+                            string.Format(Resources.MainViewModel_EncodeStatusChanged_StatusLabel,\r
                                 e.Task,\r
                                 e.TaskCount,\r
                                 e.PercentComplete,\r
-                                e.CurrentFrameRate, \r
-                                e.AverageFrameRate, \r
-                                e.EstimatedTimeLeft, \r
+                                e.CurrentFrameRate,\r
+                                e.AverageFrameRate,\r
+                                e.EstimatedTimeLeft,\r
                                 e.ElapsedTime,\r
-                                this.queueProcessor.Count);\r
+                                jobsPending);\r
+                        }\r
 \r
                         if (lastEncodePercentage != percent && this.windowsSeven.IsWindowsSeven)\r
                         {\r