mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 14:10:53 +00:00
Do not report warning over having empty list of packagesData
It can be empty if we're not able to fetch any of given packageIDs, e.g. because of missing token.
This commit is contained in:
@@ -195,17 +195,26 @@ namespace ArchiSteamFarm {
|
||||
|
||||
Dictionary<uint, (uint ChangeNumber, HashSet<uint> AppIDs)> packagesData = await bot.GetPackagesData(packageIDs).ConfigureAwait(false);
|
||||
|
||||
if ((packagesData == null) || (packagesData.Count == 0)) {
|
||||
if (packagesData == null) {
|
||||
bot.ArchiLogger.LogGenericWarning(Strings.WarningFailed);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
bool save = false;
|
||||
|
||||
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)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
PackagesData[packageID] = packageData;
|
||||
save = true;
|
||||
}
|
||||
|
||||
Utilities.InBackground(Save);
|
||||
if (save) {
|
||||
Utilities.InBackground(Save);
|
||||
}
|
||||
} finally {
|
||||
PackagesRefreshSemaphore.Release();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user