Skip to content

Commit

Permalink
- Adding request parameter to TITS items to not include encoded image…
Browse files Browse the repository at this point in the history
… data to speed up request
  • Loading branch information
Matthew Olivo committed Oct 29, 2024
1 parent 2a6116d commit 48388ce
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion MixItUp.Base/Services/External/TITSService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -169,7 +173,15 @@ public async Task<bool> 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;
}
}
Expand Down

0 comments on commit 48388ce

Please sign in to comment.