Compare commits

..

2 Commits

Author SHA1 Message Date
JustArchi
6804f5b5f7 Fix for multiple licenses for the same package 2020-06-13 21:45:37 +02:00
JustArchi
574e8739c1 Bump 2020-06-13 20:23:55 +02:00
3 changed files with 3 additions and 3 deletions

View File

@@ -197,7 +197,7 @@ namespace ArchiSteamFarm.OfficialPlugins.SteamTokenDumper {
throw new ArgumentNullException(nameof(GlobalCache));
}
Dictionary<uint, ulong> packageTokens = callback.LicenseList.ToDictionary(license => license.PackageID, license => license.AccessToken);
Dictionary<uint, ulong> packageTokens = callback.LicenseList.GroupBy(license => license.PackageID).ToDictionary(group => group.Key, group => group.OrderByDescending(license => license.TimeCreated).First().AccessToken);
await GlobalCache.UpdatePackageTokens(packageTokens).ConfigureAwait(false);
await Refresh(bot, packageTokens.Keys).ConfigureAwait(false);

View File

@@ -2376,7 +2376,7 @@ namespace ArchiSteamFarm {
Dictionary<uint, ulong> packageAccessTokens = new Dictionary<uint, ulong>();
Dictionary<uint, uint> packagesToRefresh = new Dictionary<uint, uint>();
foreach (SteamApps.LicenseListCallback.License license in callback.LicenseList) {
foreach (SteamApps.LicenseListCallback.License license in callback.LicenseList.GroupBy(license => license.PackageID).Select(group => group.OrderByDescending(license => license.TimeCreated).First())) {
OwnedPackageIDs[license.PackageID] = (license.PaymentMethod, license.TimeCreated);
if (!ASF.GlobalDatabase.PackageAccessTokensReadOnly.TryGetValue(license.PackageID, out ulong packageAccessToken) || (packageAccessToken != license.AccessToken)) {

View File

@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Version>4.2.2.3</Version>
<Version>4.2.2.4</Version>
</PropertyGroup>
<PropertyGroup>