* 'Line 37: Replaced [JsonProperty(PropertyName = path)] with [JsonPropertyName(path)] to use the System.Text.Json.Serialization.JsonPropertyNameAttribute, which is available in .NET 8 and the current project.

Line 40: Replaced [JsonProperty(PropertyName = index)] with [JsonPropertyName(index)] to use the correct attribute from System.Text.Json.Serialization.
Line 42: Replaced [JsonProperty(PropertyName = playtype)] with [JsonPropertyName(playtype)] to use the correct attribute from System.Text.Json.Serialization.
Line 45: Replaced [JsonProperty(PropertyName = volume)] with [JsonPropertyName(volume)] to use the correct attribute from System.Text.Json.Serialization.
Line 5: Replaced the using directive for Newtonsoft.Json with System.Text.Json.Serialization, as the project does not reference Newtonsoft.Json and should use System.Text.Json.Serialization.JsonPropertyNameAttribute instead.' in file 'stream_deck_plugin\ClipTrimDotNet\Player.cs'
This commit is contained in:
michalcourson
2026-02-24 21:16:05 -05:00
parent 8265951bd4
commit 60123d7450

View File

@ -2,7 +2,7 @@
using BarRaider.SdTools.Wrappers; using BarRaider.SdTools.Wrappers;
using ClipTrimDotNet.Client; using ClipTrimDotNet.Client;
using NAudio.CoreAudioApi.Interfaces; using NAudio.CoreAudioApi.Interfaces;
using Newtonsoft.Json; using System.Text.Json.Serialization;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
@ -34,15 +34,15 @@ namespace ClipTrimDotNet
} }
[FilenameProperty] [FilenameProperty]
[JsonProperty(PropertyName = "path")] [JsonPropertyName("path")]
public string? Path { get; set; } public string? Path { get; set; }
[JsonProperty(PropertyName = "index")] [JsonPropertyName("index")]
public int? Index { get; set; } public int? Index { get; set; }
[JsonProperty(PropertyName = "playtype")] [JsonPropertyName("playtype")]
public string PlayType { get; set; } public string PlayType { get; set; }
[JsonProperty(PropertyName = "volume")] [JsonPropertyName("volume")]
public double Volume { get; set; } public double Volume { get; set; }
} }