-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This does not search for item dependencies? #3
Comments
Hi, thanks for your feedback. If you tried to download with the global command, unfortunately it did not give you what you wanted. The global command simply downloads according to the given IDs. I wanted to keep the global command simple. Beacuse I will be change the structure in the future. I'm sharing code with you for download all workshop items and all dependencies of items. var {Downloader}= require('steamworkshopdownloader');
var MyDown= new Downloader();
async function GetAllIDS(Workshop){
var WorkShopIDs = [];
if(Workshop.fileType!=2){
WorkShopIDs.push(Workshop.id);
}
if(Workshop.childs!=null && Workshop.childs.length > 0){
for(const SingleChild of Workshop.childs){
var ChildInfo= await MyDown.Info([SingleChild.id]);
var ChildsOfChild=await GetAllIDS(ChildInfo.data[0]);
for(const SingleChildOfChilds of ChildsOfChild){
WorkShopIDs.push(SingleChildOfChilds);
}
}
}
return WorkShopIDs;
}
(async function(){
var Down= await MyDown.Info([2276588418]); // your collection id or workshop item
if(Down.data==null || Down.data.length <= 0){
console.log("Cant find workshop infos !!!");
}
var AllIDS=[];
for(const SingleWorkShop of Down.data){
AllIDS= AllIDS.concat(await GetAllIDS(SingleWorkShop));
}
var Uniqs= AllIDS.filter((item, i, ar) => ar.indexOf(item) === i);
await MyDown.Download(Uniqs,"./downs/");
})() |
Hello again, this feature added on version of 3. You can use "-d" option in your command. |
This is awesome!!! Thank you! The first download I tried did not work for me. I tried with other items from the workshop and it worked fine. |
The api I use does not return some things as I want. That's why such errors can occur. Thank you for creating an issue. I will solve it as soon as possible. |
Hello again, dont forget update this package for 3.1.0 2782791830 / 1552611740 = Make infinity dependencies request |
This is absolutely great! Thank you so much for this! It now works great with the tests I have done. You rocked it. |
Hi, I would like to know if this script looks for the dependencies of what I am downloading and also downloads them, that is, if I want to download a collection then it would be ideal to download all the items in the collection and also the dependencies of each item.
The text was updated successfully, but these errors were encountered: