Skip to content

Commit

Permalink
WinGui: Tidy up some warnings that you get when you import WinGui pre…
Browse files Browse the repository at this point in the history
…sets into the CLI. HandBrake#906
  • Loading branch information
sr55 committed Sep 20, 2017
1 parent b37f8bd commit 262097f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public static PresetTransportContainer GetPresetFromFile(string filename)
/// </param>
public static void ExportPreset(string filename, PresetTransportContainer container)
{
string preset = JsonConvert.SerializeObject(container, Formatting.Indented);
string preset = JsonConvert.SerializeObject(container, Formatting.Indented, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore });
using (StreamWriter writer = new StreamWriter(filename))
{
writer.Write(preset);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ public static HBPreset CreateHbPreset(Preset export, HBConfiguration config)

// Video
preset.VideoEncoder = EnumHelper<VideoEncoder>.GetShortName(export.Task.VideoEncoder);
preset.VideoFramerate = export.Task.Framerate.ToString();
preset.VideoFramerate = export.Task.Framerate.HasValue ? export.Task.Framerate.ToString() : null;
preset.VideoFramerateMode = EnumHelper<FramerateMode>.GetShortName(export.Task.FramerateMode);
preset.VideoGrayScale = export.Task.Grayscale;
preset.VideoLevel = export.Task.VideoLevel != null ? export.Task.VideoLevel.ShortName : null;
Expand Down

0 comments on commit 262097f

Please sign in to comment.