• FileBase - Add to batch downloads?

    From Nightfox@VERT/DIGDIST to Digital Man on Wed Jan 26 09:31:35 2022
    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ããNightfoxãã---ã þ Synchronet þ Digital Distortion: digitaldistortionbbs.comã
  • From Digital Man@VERT to Nightfox on Wed Jan 26 13:59:48 2022
    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ã
  • From Nightfox@VERT/DIGDIST to Digital Man on Wed Jan 26 15:37:40 2022
    Re: FileBase - Add to batch downloads?ã By: Digital Man to Nightfox on Wed Jan 26 2022 01:59 pmãã DM> No, there isn't a per-base "add to batch download queue" method (yes, Iã DM> could add one pretty easily). However, the batch lists are now just .iniã DM> files (for details, seeã DM> https://wiki.synchro.net/history:newfilebase#batches), so adding/removingã DM> files to the queue from a JS module should be pretty trivial. I'm prettyã DM> sure you know the File class has methods for dealing with .ini files.ããIt looks like the bbs.batch_add_list() function (which has been around since version 3.10) is able to add files to the user's batch download list, and it seems the file format it expects is just one filename per line. Are you recommending to no longer use bbs.batch_add_list() but to write an ini file instead?ããNightfoxãã---ã þ Synchronet þ Digital Distortion: digitaldistortionbbs.comã
  • From Digital Man@VERT to Nightfox on Wed Jan 26 17:07:15 2022
    Re: FileBase - Add to batch downloads?ã By: Nightfox to Digital Man on Wed Jan 26 2022 03:37 pmãã > Re: FileBase - Add to batch downloads?ã > By: Digital Man to Nightfox on Wed Jan 26 2022 01:59 pmã >ã > DM> No, there isn't a per-base "add to batch download queue" method (yes, Iã > DM> could add one pretty easily). However, the batch lists are now justã > DM> .ini files (for details, seeã > DM> https://wiki.synchro.net/history:newfilebase#batches), soã > DM> adding/removing files to the queue from a JS module should be prettyã > DM> trivial. I'm pretty sure you know the File class has methods forã > DM> dealing with .ini files.ã >ã > It looks like the bbs.batch_add_list() function (which has been around sinceã > version 3.10) is able to add files to the user's batch download list, and itã > seems the file format it expects is just one filename per line. Are youã > recommending to no longer use bbs.batch_add_list() but to write an ini fileã > instead?ããCorrect. If you want to add files fast, open the appropriate file (as mentioned in that wiki article) and add the file details.ããOr you can wait and I'll add a FileBase() method to do that for you, but it won't exist in v3.19b. Opening and updating the .ini file will work for v3.19b and future versions.ã-- ã digital man (rob)ããSynchronet "Real Fact" #108:ãWeedpuller "Falling Star" http://youtu.be/J0ijOUT7KIwãNorco, CA WX: 64.3øF, 20.0% humidity, 0 mph NNW wind, 0.00 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From Nightfox@VERT/DIGDIST to Digital Man on Wed Jan 26 17:19:40 2022
    Re: FileBase - Add to batch downloads?ã By: Digital Man to Nightfox on Wed Jan 26 2022 05:07 pmãã >> line. Are you recommending to no longer use bbs.batch_add_list() butã >> to write an ini file instead?ãã DM> Correct. If you want to add files fast, open the appropriate file (asã DM> mentioned in that wiki article) and add the file details. ãã DM> Or you can wait and I'll add a FileBase() method to do that for you, butã DM> it won't exist in v3.19b. Opening and updating the .ini file will work forã DM> v3.19b and future versions.ããI'll just have it open and update the .ini file.ããThanks.ããNightfoxãã---ã þ Synchronet þ Digital Distortion: digitaldistortionbbs.comã