feat: add DTOs for basic endpoints

This commit is contained in:
2026-01-28 05:17:11 +01:00
parent 03940a99ba
commit 6736ce8c13
6 changed files with 169 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
using System.Text.Json.Serialization;
using System.Xml.Linq;
using System.Xml.Serialization;
namespace Shadow.DTOs;
public class SubsonicResponseDTO
{
[JsonPropertyName("status")]
public string Status { get; set; } = "ok";
[JsonPropertyName("version")]
public string version { get; set; } = "1.15.0";
[JsonPropertyName("type")]
public string type { get; set; } = "shadow";
[JsonPropertyName("serverVersion")]
public string serverVersion { get; set; } = $"0.0.1 ({ThisAssembly.Git.Commit})";
[JsonPropertyName("openSubsonic")]
public bool openSubsonic { get; set; } = true;
[JsonPropertyName("error")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ErrorDTO? error { get; set; } = null;
[JsonPropertyName("albumList2")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public AlbumList2DTO? albumList2 { get; set; } = null;
[JsonPropertyName("user")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public UserPingDTO? userPing { get; set; } = null;
}