steamutils 1.0.42 → 1.0.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.idea/steamutils.iml +1 -1
- package/.idea/vcs.xml +1 -1
- package/SteamClient.js +6 -5
- package/package.json +1 -1
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
package/.idea/steamutils.iml
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
<module type="WEB_MODULE" version="4">
|
3
3
|
<component name="NewModuleRootManager">
|
4
4
|
<content url="file://$MODULE_DIR$">
|
5
|
-
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
6
5
|
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
6
|
+
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
7
7
|
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
8
8
|
</content>
|
9
9
|
<orderEntry type="inheritedJdk" />
|
package/.idea/vcs.xml
CHANGED
package/SteamClient.js
CHANGED
@@ -736,11 +736,12 @@ function SteamClient({
|
|
736
736
|
async function autoRequestFreeLicense(log = false, max = 10) {
|
737
737
|
const steamUtils = new SteamUtils(getCookie())
|
738
738
|
|
739
|
-
const ownedAppsCount = log ? (await steamUtils.getDynamicStoreUserData())
|
740
|
-
let recommendedApps = _.shuffle((await steamUtils.getDynamicStoreUserData())?.rgRecommendedApps)
|
741
|
-
if (!recommendedApps
|
742
|
-
recommendedApps = (await axios.request({url: 'https://raw.githubusercontent.com/5x/easy-steam-free-packages/master/src/script/packages_db.json'}))?.data?.packages
|
739
|
+
const ownedAppsCount = log ? ((await steamUtils.getDynamicStoreUserData())?.rgOwnedApps?.length || 0) : 0
|
740
|
+
let recommendedApps = Math.random() > 0.5 ? _.shuffle((await steamUtils.getDynamicStoreUserData())?.rgRecommendedApps || []) : []
|
741
|
+
if (!recommendedApps?.length) {
|
742
|
+
recommendedApps = (await axios.request({url: 'https://raw.githubusercontent.com/5x/easy-steam-free-packages/master/src/script/packages_db.json'}))?.data?.packages || []
|
743
743
|
}
|
744
|
+
|
744
745
|
if (max) {
|
745
746
|
recommendedApps.length = Math.min(recommendedApps.length, max)
|
746
747
|
}
|
@@ -761,7 +762,7 @@ function SteamClient({
|
|
761
762
|
}
|
762
763
|
if (log) {
|
763
764
|
await sleep(20000)
|
764
|
-
const ownedAppsCount2 = (await steamUtils.getDynamicStoreUserData())
|
765
|
+
const ownedAppsCount2 = (await steamUtils.getDynamicStoreUserData())?.rgOwnedApps?.length || 0
|
765
766
|
const increaseNumber = ownedAppsCount2 - ownedAppsCount;
|
766
767
|
console.log(getAccountInfoName(), `OwnedApps length ${ownedAppsCount2}, increase ${increaseNumber}`)
|
767
768
|
}
|
package/package.json
CHANGED