From ce547cd5f37f12edaaf1824465e98623e8872392 Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Wed, 10 Feb 2021 12:40:23 +0200 Subject: [PATCH] Remove unused app tickets --- DepotDownloader/ContentDownloader.cs | 3 --- DepotDownloader/Steam3Session.cs | 37 ---------------------------- 2 files changed, 40 deletions(-) diff --git a/DepotDownloader/ContentDownloader.cs b/DepotDownloader/ContentDownloader.cs index 02df40b9..23d167df 100644 --- a/DepotDownloader/ContentDownloader.cs +++ b/DepotDownloader/ContentDownloader.cs @@ -612,9 +612,6 @@ namespace DepotDownloader return null; } - // Skip requesting an app ticket - steam3.AppTickets[ depotId ] = null; - if (manifestId == INVALID_MANIFEST_ID) { manifestId = GetSteam3DepotManifest(depotId, appId, branch); diff --git a/DepotDownloader/Steam3Session.cs b/DepotDownloader/Steam3Session.cs index 25d35962..bd085d34 100644 --- a/DepotDownloader/Steam3Session.cs +++ b/DepotDownloader/Steam3Session.cs @@ -31,7 +31,6 @@ namespace DepotDownloader private set; } - public Dictionary AppTickets { get; private set; } public Dictionary AppTokens { get; private set; } public Dictionary PackageTokens { get; private set; } public Dictionary DepotKeys { get; private set; } @@ -82,7 +81,6 @@ namespace DepotDownloader this.bDidReceiveLoginKey = false; this.seq = 0; - this.AppTickets = new Dictionary(); this.AppTokens = new Dictionary(); this.PackageTokens = new Dictionary(); this.DepotKeys = new Dictionary(); @@ -287,41 +285,6 @@ namespace DepotDownloader return success; } - public void RequestAppTicket( uint appId ) - { - if ( AppTickets.ContainsKey( appId ) || bAborted ) - return; - - - if ( !authenticatedUser ) - { - AppTickets[ appId ] = null; - return; - } - - bool completed = false; - Action cbMethod = ( appTicket ) => - { - completed = true; - - if ( appTicket.Result != EResult.OK ) - { - Console.WriteLine( "Unable to get appticket for {0}: {1}", appTicket.AppID, appTicket.Result ); - Abort(); - } - else - { - Console.WriteLine( "Got appticket for {0}!", appTicket.AppID ); - AppTickets[ appTicket.AppID ] = appTicket.Ticket; - } - }; - - WaitUntilCallback( () => - { - callbacks.Subscribe( steamApps.GetAppOwnershipTicket( appId ), cbMethod ); - }, () => { return completed; } ); - } - public void RequestDepotKey( uint depotId, uint appid = 0 ) { if ( DepotKeys.ContainsKey( depotId ) || bAborted )