From 48388ce3d00128e5185e7ccd2ed2ad7475a51b34 Mon Sep 17 00:00:00 2001 From: Matthew Olivo Date: Mon, 28 Oct 2024 18:33:53 -0700 Subject: [PATCH] - Adding request parameter to TITS items to not include encoded image data to speed up request --- MixItUp.Base/Services/External/TITSService.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/MixItUp.Base/Services/External/TITSService.cs b/MixItUp.Base/Services/External/TITSService.cs index 7697d9633..1acc7669e 100644 --- a/MixItUp.Base/Services/External/TITSService.cs +++ b/MixItUp.Base/Services/External/TITSService.cs @@ -30,6 +30,10 @@ public class TITSWebSocketRequestPacket public string messageType { get; set; } public JObject data { get; set; } + [Obsolete] + // Only for use with TITSItemListRequest request + public bool sendImage { get; set; } + public TITSWebSocketRequestPacket() { } public TITSWebSocketRequestPacket(string messageType) @@ -169,7 +173,15 @@ public async Task RequestAllItems() { if (this.websocket.IsOpen()) { - await this.websocket.Send(new TITSWebSocketRequestPacket("TITSItemListRequest")); + JObject data = new JObject(); + data["sendImage"] = false; + +#pragma warning disable CS0612 // Type or member is obsolete + await this.websocket.Send(new TITSWebSocketRequestPacket("TITSItemListRequest", data) + { + sendImage = false + }); +#pragma warning restore CS0612 // Type or member is obsolete return true; } }