#21
|
|||
|
|||
Quote:
__________________
Aktuelles Windows |
#22
|
||||
|
||||
Yes.
You can simply test this by manually assingning the highest prio on some links in your downloadlist
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#23
|
||||
|
||||
The *next downloadlink* selection will prefer them, yes
__________________
JD-Dev & Server-Admin |
#24
|
|||
|
|||
OK, yes, I will try it, thank you very much!
__________________
Aktuelles Windows |
#25
|
|||
|
|||
mgpai? Would it be possible to add to the script - works great - a function to add a comment or / and something else that lets the deactivated links (by the script) distinguish from other deactivated links? E.g. links I manually deactivated (temporarilly), etc.?
And may be the script could only effect resumable downloads?
__________________
Aktuelles Windows Last edited by Dockel; 11.06.2021 at 10:45. |
#26
|
|||
|
|||
Quote:
While the script is currently set to disable when 50% of a file is loaded, you can adjust the percentage limit in the script as required. If necessary, the script can be modified to check for bytes loaded instead of percentage loaded. |
#27
|
|||
|
|||
That is great! Thank you so much!
Adjustable by this value: = 50%. Alright, very good. OK, good to know, percantage is very good at the moment, thank you. Many thanks again!
__________________
Aktuelles Windows |
#28
|
||||
|
||||
@mgpai: you should update plugin to only disable the correct mirrors
use ConditionalSkipReasonSandbox.getDownloadLinkCondition to get the DownloadLinkSandbox of the running download. Check against the running download link
__________________
JD-Dev & Server-Admin |
#29
|
|||
|
|||
Quote:
Code:
if ( link2.name == link.name && link2.conditionalSkipReason.className == "MirrorLoading" ) link2 = current iteration link current iteration link name == running link name current iteration link className == "MirrorLoading" If current iteration link is running link, className will not be equal to "MirrorLoading" (no csr, no classname = catch error), so only correct links (which match running link name) will be disabled. Or is there any fault in logic? Either way, if there a better method can you please provide psuedo code? Let me know if I should contact you by email. P.S.: I wanted to avoid using interval trigger. Will email you the script based on your method. Last edited by mgpai; 11.06.2021 at 15:12. |
#30
|
||||
|
||||
@mgpai: ah you use the name as condition, that's okay as well
__________________
JD-Dev & Server-Admin |
#31
|
||||
|
||||
ConditionalSkipReasonSandbox.getDownloadLinkCondition to get the DownloadLinkSandbox, then you can compare getUUID
__________________
JD-Dev & Server-Admin |
#32
|
|||
|
|||
How can I change / adapt this line, if I want the mirrors to be deactivated when a download is downloaded 5 %:
link.bytesLoaded / link.bytesTotal < 0.50 // 0.50 = 50% to link.bytesLoaded / link.bytesTotal < 0.05 // 0.05 = 05 % Is that right?
__________________
Aktuelles Windows |
#33
|
||||
|
||||
@Dockel: sounds about right, the while loop loops while the condition is true, so until 5% is loaded
__________________
JD-Dev & Server-Admin |
#34
|
|||
|
|||
OK, so I will replace it. Thank you!
I was also unsure whether it might have to be like this: link.bytesLoaded / link.bytesTotal < 0.05 // 0.05 = 5%
__________________
Aktuelles Windows |
#35
|
||||
|
||||
__________________
JD-Dev & Server-Admin |
#36
|
|||
|
|||
Ah, zwei Schrägstriche, ja. / Two backslashes, yes.
Danke!
__________________
Aktuelles Windows |
Thread Tools | |
Display Modes | |
|
|