Subj : FileBase - Add to batch downloads? To : Nightfox From : Digital Man Date : Wed Jan 26 2022 13:59:48 Re: FileBase - Add to batch downloads? By: Nightfox to Digital Man on Wed Jan 26 2022 09:31 am > Hi DM, > > Synchronet's JS object model has had bbs.batch_add_list() for a while now. > With each file in the list, it has to search the whole file database to see > if and where the file exists in the filebases. > > Now that there is a FileBase class, I'm wondering if it would make sense for > the FileBase class to have a similar batch_add function, for files just > within that filebase? I've been working on a lightbar file lister, and if > the user wants to add one of the files in that filebase to their batch > download queue, I was thinking it might make sense for the FileBase class to > have its own batch_add function, so that Synchronet wouldn't have to search > through all of the filebases for that file. > > If there already is such a function in the FileBase class, I'm not seeing it > in the current documentation.. Maybe I missed it? > http://www.synchro.net/docs/jsobjs.html#FileBase_class No, there isn't a per-base "add to batch download queue" method (yes, I could add one pretty easily). However, the batch lists are now just .ini files (for details, see https://wiki.synchro.net/history:newfilebase#batches), so adding/removing files to the queue from a JS module should be pretty trivial. I'm pretty sure you know the File class has methods for dealing with .ini files. -- digital man (rob) Synchronet "Real Fact" #22: The second ever Synchronet BBS was the Mid-Nite Hacker BBS (sysop: The Zapper) Norco, CA WX: 69.7øF, 16.0% humidity, 3 mph NNW wind, 0.00 inches rain/24hrs --- þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net .