Access to the Upload/Download Batch List from Javascript
Combining two entries for this one feature...
Is there any way of reading/writing the Upload/Download Queues from within Javascript? (eg: Synchronet C variables: batdn_total, batdn_dir, batdn_cdt, batdn_alt, batdn_size, batdn_offset). I am trying to customize my own batch file menu but it looks as though the queue is only stored in memory until the download is initiated.
I am currently using the bbs.batch_add_list() command to add files to the download queue but it searches each file area for the filenames provided and I can forsee an issue if there are more than 1 file with the same name in different areas. A Javascript command straight to the C Source function addotbatdl() would be great as it checks all the user limits, requirements, etc before adding the file to the queue without searching the file areas.
-- High Spirit Digital Realms Main - connect.digitalrealms.net 23
Digital Realms C=64 - connect.digitalrealms.net 6400
---
■ Synchronet ■ Digital Creation BBS -- bbs.digitalcreationbbs.com:23
Re: Access to the Upload/Download Batch List from Javascript
By: High Spirit to All on Fri Jan 05 2018 12:29 pm
Is there any way of reading/writing the Upload/Download Queues from within Javascript? (eg: Synchronet C variables: batdn_total, batdn_dir, batdn_cdt, batdn_alt, batdn_size, batdn_offset). I am trying to customize my own batch file menu but it looks as though the queue is only stored in memory until the download is initiated.
I am currently using the bbs.batch_add_list() command to add files to the download queue but it searches each file area for the filenames provided and I can forsee an issue if there are more than 1 file with the same name in different areas. A Javascript command straight to the C Source function addotbatdl() would be great as it checks all the user limits, requirements, etc before adding the file to the queue without searching the file areas.
One solution: keep the queues in disk file for most of their life
e.g. data/user/*.dlq, in .ini format like so:
[filename.zip]
dir=games
offset=0
etc.
Adding wold be cake. Removing the list, easy. Removing an item from the list, not too bad. This would make it trivial for others to modify the queue(s) and even expose them to other processes (e.g. the FTP server).
I guess do the same with the upload queue.