Core: Fix config nullable warning

This commit is contained in:
Genteure 2021-07-15 20:21:30 +08:00
parent 3e3cb142fd
commit 2521ed228e
2 changed files with 6 additions and 5 deletions

View File

@ -95,10 +95,10 @@ namespace BililiveRecorder.Core.Config.V2
/// <summary> /// <summary>
/// 录制的直播画质 qn 值,逗号分割,靠前的优先 /// 录制的直播画质 qn 值,逗号分割,靠前的优先
/// </summary> /// </summary>
public string RecordingQuality { get => this.GetPropertyValue<string>(); set => this.SetPropertyValue(value); } public string? RecordingQuality { get => this.GetPropertyValue<string>(); set => this.SetPropertyValue(value); }
public bool HasRecordingQuality { get => this.GetPropertyHasValue(nameof(this.RecordingQuality)); set => this.SetPropertyHasValue<string>(value, nameof(this.RecordingQuality)); } public bool HasRecordingQuality { get => this.GetPropertyHasValue(nameof(this.RecordingQuality)); set => this.SetPropertyHasValue<string>(value, nameof(this.RecordingQuality)); }
[JsonProperty(nameof(RecordingQuality)), EditorBrowsable(EditorBrowsableState.Never)] [JsonProperty(nameof(RecordingQuality)), EditorBrowsable(EditorBrowsableState.Never)]
public Optional<string> OptionalRecordingQuality { get => this.GetPropertyValueOptional<string>(nameof(this.RecordingQuality)); set => this.SetPropertyValueOptional(value, nameof(this.RecordingQuality)); } public Optional<string?> OptionalRecordingQuality { get => this.GetPropertyValueOptional<string>(nameof(this.RecordingQuality)); set => this.SetPropertyValueOptional(value, nameof(this.RecordingQuality)); }
/// <summary> /// <summary>
/// 录制断开重连时间间隔 毫秒 /// 录制断开重连时间间隔 毫秒
@ -328,10 +328,10 @@ namespace BililiveRecorder.Core.Config.V2
/// <summary> /// <summary>
/// 录制的直播画质 qn 值,逗号分割,靠前的优先 /// 录制的直播画质 qn 值,逗号分割,靠前的优先
/// </summary> /// </summary>
public string RecordingQuality { get => this.GetPropertyValue<string>(); set => this.SetPropertyValue(value); } public string? RecordingQuality { get => this.GetPropertyValue<string>(); set => this.SetPropertyValue(value); }
public bool HasRecordingQuality { get => this.GetPropertyHasValue(nameof(this.RecordingQuality)); set => this.SetPropertyHasValue<string>(value, nameof(this.RecordingQuality)); } public bool HasRecordingQuality { get => this.GetPropertyHasValue(nameof(this.RecordingQuality)); set => this.SetPropertyHasValue<string>(value, nameof(this.RecordingQuality)); }
[JsonProperty(nameof(RecordingQuality)), EditorBrowsable(EditorBrowsableState.Never)] [JsonProperty(nameof(RecordingQuality)), EditorBrowsable(EditorBrowsableState.Never)]
public Optional<string> OptionalRecordingQuality { get => this.GetPropertyValueOptional<string>(nameof(this.RecordingQuality)); set => this.SetPropertyValueOptional(value, nameof(this.RecordingQuality)); } public Optional<string?> OptionalRecordingQuality { get => this.GetPropertyValueOptional<string>(nameof(this.RecordingQuality)); set => this.SetPropertyValueOptional(value, nameof(this.RecordingQuality)); }
} }

View File

@ -121,6 +121,7 @@ module.exports = {
"name": "RecordingQuality", "name": "RecordingQuality",
"type": "string", "type": "string",
"desc": "录制的直播画质 qn 值,逗号分割,靠前的优先", "desc": "录制的直播画质 qn 值,逗号分割,靠前的优先",
"default": "\"10000\"" "default": "\"10000\"",
"nullable": true
},] },]
} }