revert: move the encoding.xml EncoderPreset fix to its own branch
It is an unrelated subsystem and ships as a separate change.
This commit is contained in:
@@ -1,10 +1,7 @@
|
||||
#pragma warning disable CA1819 // XML serialization handles collections improperly, so we need to use arrays
|
||||
|
||||
#nullable disable
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Xml.Serialization;
|
||||
using MediaBrowser.Model.Entities;
|
||||
|
||||
namespace MediaBrowser.Model.Configuration;
|
||||
@@ -237,24 +234,8 @@ public class EncodingOptions
|
||||
/// <summary>
|
||||
/// Gets or sets the encoder preset.
|
||||
/// </summary>
|
||||
[XmlIgnore]
|
||||
public EncoderPreset EncoderPreset { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the encoder preset as it is stored in the configuration file. Files written before the preset
|
||||
/// list was validated can carry an empty element, which has to read back as the default rather than throw and
|
||||
/// take the rest of the configuration down with it.
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[XmlElement(nameof(EncoderPreset))]
|
||||
public string EncoderPresetXml
|
||||
{
|
||||
get => EncoderPreset.ToString();
|
||||
set => EncoderPreset = Enum.TryParse<EncoderPreset>(value, true, out var encoderPreset)
|
||||
? encoderPreset
|
||||
: EncoderPreset.auto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether the framerate is doubled when deinterlacing.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user