#1
|
|||
|
|||
JS API to manage chunks
I use a modded version of "Reset a Download if the speed is slow" script.
Currently we can only get total download speed (sum of chunks speeds). And when we do download.abort(), all chunks are restarted. This may even be considered abuse by some servers. Sometimes there are chunks downloading in good speed and I want to restart only the slow ones. I would like to suggest an API to manage chunks individually, so we can do thinks like: Code:
var chunks = myDownloadLink.getChunks(); chunks.forEach(function (chunk) { if (chunk.getSpeed() < X) { chunk.abort(); } }); Thank you. Last edited by pintassilgo; 11.05.2020 at 05:04. Reason: extra details/request |
#2
|
||||
|
||||
Our current download core can not do this,
soon as one as a single chunk has a timeout all sockets are closed relating to the download. So an JS api wont be of any use. New download core can handle chunks disconnecting and will reconnect on its own accord when a timeout occurs. It can add more chunks when some finish before others, It can also add chunks to slow chunk. If you ask when this comes public, no idea when Jiaz will release. It has been years since he wrote support, but its still missing functions in which he wants completed (and tested) prior to release. raztoki
__________________
raztoki @ jDownloader reporter/developer http://svn.jdownloader.org/users/170 Don't fight the system, use it to your advantage. :] |
#3
|
|||
|
|||
Thank you for the answer.
Since future download core (which seems promising, I cannot wait for it) may allow this kind of API, shouldn't this request stay open instead of declined? |
#4
|
||||
|
||||
As I understand, it shouldn't needed. Everything should be/already is handled internally.
__________________
raztoki @ jDownloader reporter/developer http://svn.jdownloader.org/users/170 Don't fight the system, use it to your advantage. :] |
#5
|
||||
|
||||
Correct, once the new core will be available, it will auto add/remove connections and there are no plans to add special support for scripting.
__________________
JD-Dev & Server-Admin Last edited by Jiaz; 11.05.2020 at 14:32. |
Thread Tools | |
Display Modes | |
|
|