From 9ed8a7050802ecc859b3e95253593133fc3d86ec Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Mon, 21 Oct 2024 14:53:41 +0300 Subject: [PATCH] Update steamkit --- DepotDownloader/DepotDownloader.csproj | 2 +- DepotDownloader/Steam3Session.cs | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/DepotDownloader/DepotDownloader.csproj b/DepotDownloader/DepotDownloader.csproj index 0b13bed3..beb1c230 100644 --- a/DepotDownloader/DepotDownloader.csproj +++ b/DepotDownloader/DepotDownloader.csproj @@ -26,6 +26,6 @@ - + diff --git a/DepotDownloader/Steam3Session.cs b/DepotDownloader/Steam3Session.cs index 970a5690..51b3de61 100644 --- a/DepotDownloader/Steam3Session.cs +++ b/DepotDownloader/Steam3Session.cs @@ -39,7 +39,7 @@ namespace DepotDownloader public SteamContent steamContent; readonly SteamApps steamApps; readonly SteamCloud steamCloud; - readonly SteamUnifiedMessages.UnifiedService steamPublishedFile; + readonly PublishedFile steamPublishedFile; readonly CallbackManager callbacks; @@ -72,7 +72,7 @@ namespace DepotDownloader this.steamApps = this.steamClient.GetHandler(); this.steamCloud = this.steamClient.GetHandler(); var steamUnifiedMessages = this.steamClient.GetHandler(); - this.steamPublishedFile = steamUnifiedMessages.CreateService(); + this.steamPublishedFile = steamUnifiedMessages.CreateService(); this.steamContent = this.steamClient.GetHandler(); this.callbacks = new CallbackManager(this.steamClient); @@ -285,15 +285,14 @@ namespace DepotDownloader var pubFileRequest = new CPublishedFile_GetDetails_Request { appid = appId }; pubFileRequest.publishedfileids.Add(pubFile); - var callback = await steamPublishedFile.SendMessage(api => api.GetDetails(pubFileRequest)); + var details = await steamPublishedFile.GetDetails(pubFileRequest); - if (callback.Result == EResult.OK) + if (details.Result == EResult.OK) { - var response = callback.GetDeserializedResponse(); - return response.publishedfiledetails.FirstOrDefault(); + return details.Body.publishedfiledetails.FirstOrDefault(); } - throw new Exception($"EResult {(int)callback.Result} ({callback.Result}) while retrieving file details for pubfile {pubFile}."); + throw new Exception($"EResult {(int)details.Result} ({details.Result}) while retrieving file details for pubfile {pubFile}."); }