diff options
Diffstat (limited to 'win/C#/frmMain')
-rw-r--r-- | win/C#/frmMain/PresetLoader.cs | 18 | ||||
-rw-r--r-- | win/C#/frmMain/QueryGenerator.cs | 8 |
2 files changed, 17 insertions, 9 deletions
diff --git a/win/C#/frmMain/PresetLoader.cs b/win/C#/frmMain/PresetLoader.cs index aa05cc876..ab4561c71 100644 --- a/win/C#/frmMain/PresetLoader.cs +++ b/win/C#/frmMain/PresetLoader.cs @@ -216,13 +216,17 @@ namespace Handbrake mainWindow.lv_audioList.Items.Clear();
// Create a new row for the Audio list based on the currently selected items in the dropdown.
- ListViewItem newTrack = new ListViewItem("Automatic");
- newTrack.SubItems.Add(presetQuery.AudioEncoder1);
- newTrack.SubItems.Add(presetQuery.AudioTrackMix1);
- newTrack.SubItems.Add(presetQuery.AudioSamplerate1);
- newTrack.SubItems.Add(presetQuery.AudioBitrate1);
- newTrack.SubItems.Add(presetQuery.DRC1.ToString());
- mainWindow.lv_audioList.Items.Add(newTrack);
+ ListViewItem newTrack;
+ if (presetQuery.AudioTrack1 != "None")
+ {
+ newTrack = new ListViewItem("Automatic");
+ newTrack.SubItems.Add(presetQuery.AudioEncoder1);
+ newTrack.SubItems.Add(presetQuery.AudioTrackMix1);
+ newTrack.SubItems.Add(presetQuery.AudioSamplerate1);
+ newTrack.SubItems.Add(presetQuery.AudioBitrate1);
+ newTrack.SubItems.Add(presetQuery.DRC1.ToString());
+ mainWindow.lv_audioList.Items.Add(newTrack);
+ }
if (presetQuery.AudioTrack2 != "None")
{
diff --git a/win/C#/frmMain/QueryGenerator.cs b/win/C#/frmMain/QueryGenerator.cs index d7a4900fc..f9f84bbd5 100644 --- a/win/C#/frmMain/QueryGenerator.cs +++ b/win/C#/frmMain/QueryGenerator.cs @@ -273,11 +273,14 @@ namespace Handbrake List<string> bitrates = new List<string>();
List<string> drcs = new List<string>();
+ // No Audio
+ if (audioTracks.Items.Count == 0)
+ query += " -a none ";
+
// Gather information about each audio track and store them in the declared lists.
foreach (ListViewItem row in audioTracks.Items)
{
// Audio Track (-a)
- String track = String.Empty;
if (row.Text == "Automatic")
tracks.Add("1");
else if (row.Text != "None")
@@ -320,7 +323,8 @@ namespace Handbrake else
audioItems += "," + item;
}
- query += " -a " + audioItems;
+ if (audioItems.Trim() != String.Empty)
+ query += " -a " + audioItems;
firstLoop = true; audioItems = ""; // Reset for another pass.
// Audio Codec (-E)
|