diff --git a/Shokofin/API/Models/ComponentVersion.cs b/Shokofin/API/Models/ComponentVersion.cs index 7f3db89..ef612e0 100644 --- a/Shokofin/API/Models/ComponentVersion.cs +++ b/Shokofin/API/Models/ComponentVersion.cs @@ -2,6 +2,7 @@ using System.ComponentModel; using System.Linq; using System.Text.Json.Serialization; +using System.Xml.Serialization; using Shokofin.Extensions; namespace Shokofin.API.Models; @@ -18,8 +19,15 @@ public class ComponentVersion { /// Version number. /// [DefaultValue("1.0.0.0")] + [XmlIgnore] public Version Version { get; set; } = new("1.0.0.0"); + [XmlElement("Version")] + public string VersionString { + get => Version.ToString(); + set => Version = string.IsNullOrEmpty(value) ? new("1.0.0.0") : new(value); + } + /// /// Commit SHA. ///