mirror of
https://github.com/JustArchiNET/ArchiSteamFarm
synced 2024-11-10 23:24:36 +00:00
Always schedule package for refresh on token change
This commit is contained in:
parent
0d8753f44e
commit
73014c71a1
2 changed files with 4 additions and 3 deletions
|
@ -2381,9 +2381,10 @@ namespace ArchiSteamFarm {
|
||||||
|
|
||||||
if (!ASF.GlobalDatabase.PackageAccessTokensReadOnly.TryGetValue(license.PackageID, out ulong packageAccessToken) || (packageAccessToken != license.AccessToken)) {
|
if (!ASF.GlobalDatabase.PackageAccessTokensReadOnly.TryGetValue(license.PackageID, out ulong packageAccessToken) || (packageAccessToken != license.AccessToken)) {
|
||||||
packageAccessTokens[license.PackageID] = license.AccessToken;
|
packageAccessTokens[license.PackageID] = license.AccessToken;
|
||||||
}
|
|
||||||
|
|
||||||
if (!ASF.GlobalDatabase.PackagesDataReadOnly.TryGetValue(license.PackageID, out (uint ChangeNumber, HashSet<uint> AppIDs) packageData) || (packageData.ChangeNumber < license.LastChangeNumber)) {
|
// Package is always due to refresh with access token change
|
||||||
|
packagesToRefresh[license.PackageID] = (uint) license.LastChangeNumber;
|
||||||
|
} else if (!ASF.GlobalDatabase.PackagesDataReadOnly.TryGetValue(license.PackageID, out (uint ChangeNumber, HashSet<uint> AppIDs) packageData) || (packageData.ChangeNumber < license.LastChangeNumber)) {
|
||||||
packagesToRefresh[license.PackageID] = (uint) license.LastChangeNumber;
|
packagesToRefresh[license.PackageID] = (uint) license.LastChangeNumber;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -204,7 +204,7 @@ namespace ArchiSteamFarm {
|
||||||
bool save = false;
|
bool save = false;
|
||||||
|
|
||||||
foreach ((uint packageID, (uint ChangeNumber, HashSet<uint> AppIDs) packageData) in packagesData) {
|
foreach ((uint packageID, (uint ChangeNumber, HashSet<uint> AppIDs) packageData) in packagesData) {
|
||||||
if (PackagesData.TryGetValue(packageID, out (uint ChangeNumber, HashSet<uint> AppIDs) previousData) && (packageData.ChangeNumber <= previousData.ChangeNumber)) {
|
if (PackagesData.TryGetValue(packageID, out (uint ChangeNumber, HashSet<uint> AppIDs) previousData) && (packageData.ChangeNumber < previousData.ChangeNumber)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue