Commit graph

4 commits

Author SHA1 Message Date
Pat Hartl
4817c00939 Update SharpCompress, move to async extraction, add logging per entry on fail 2026-03-09 22:12:09 -05:00
Pat Hartl
c4217d7b41 Refactor HTTP streaming
Greatly reduces the amount of memory usage when streaming from the server by:
1. Shedding use of an internal MemoryStream
2. Using HttpCompletionOption.ResponseHeadersRead to start reading the stream without loading all of the HttpContent into memory
2025-10-09 02:16:20 -05:00
Pat Hartl
a648852292 Implement SDK using dependency injection
- API requests are now made through the ApiRequestBuilder with DI supplied via the ApiRequestFactory singleton
- Reliance on RestSharp and WebClient has been removed in favor of HttpClient
- Auth token is now being tracked by the ITokenProvider
- Network information (MAC address, broadcast addresses, IP address) is now supplied with the INetworkInformationProvider singleton
- Connection state is now being maintained by the ConnectionService, with a reliance on RPC (SignalR websocket) reporting actual connection state without relying on pings
- All download streams are now provided as a TrackableStream
- Singleton Client class has been removed. All usage of the SDK should happen via Dependency Injection

This is just a base, non-functional refactor of the SDK to use DI. The following changes to the rest of the codebase need to be made:
- Usage of the SDK client in the launcher needs to be replaced in favor of injecting SDK services
- PowerShell cmdlets need to be able to have services injected. Most likely a separate scope will have to be opened up per PS runtime?
- Usage of the SDK client in the server needs to be replaced in favor of injecting SDK services. This should be minimal and should actually provide benefit when it comes to executing client-like features (scripts mostly) without needing a fully configured client that maintains connection state.
- Configuration of the client needs to be implemented using ILANCommanderConfiguration
2025-09-22 00:29:51 -05:00
Pat Hartl
a679fae0cb Relocate crucial installation logic to SDK 2023-11-09 19:40:38 -06:00
Renamed from LANCommander.Playnite.Extension/TrackableStream.cs (Browse further)