#1
|
|||
|
|||
Mirrors: bei Unterbrechung selbe Datei weiterladen anstatt neue?
Wenn mehrere identische Downloads (mirrors) zur Verfügung stehen, beginnt JD eine von ihnen zu laden, nach einer Unterbrechung lädt JD aber dann vielleicht oft eine andere Datei statt die bereits angefangene zu Ende zu laden, z.B.:
Wie kann man JD dazu bewegen, die Angefangenen zu Ende zu laden, statt neue beginnen zu laden?
__________________
Aktuelles Windows |
#2
|
|||
|
|||
Currently there is no setting to force the incomplete download to resume. You can use a script to disable the mirror links and thus prevent other links from loading.
|
#3
|
|||
|
|||
Ah, actually I would have thought JD does it automatically. So resuming a download always being startet to download. So I have downloads e.g. 97 % downloaded and JD starts another mirror.
__________________
Aktuelles Windows |
#4
|
||||
|
||||
@Dockel: JDownloader currently cannot resume a download with a different download/mirror due to internal limitations of download core.
__________________
JD-Dev & Server-Admin |
#5
|
|||
|
|||
Quote:
Currently if the download is stopped/interrupted and started again, JD might choose a different download candidate (mirror), instead of resuming the existing partially downloaded one. |
#6
|
|||
|
|||
Thank you Jiaz.
Quote:
__________________
Aktuelles Windows |
#7
|
||||
|
||||
Understood. unfortunately that's not supported out of the box but mgpai might be able to create a script for this
@mgpai: use getConditionalSkipReason the download links and in case it is available, check for ConditionalSkipReasonSandbox.getClassName contains MirrorLoading, then you could for example disable/skip the mirrors and prevent them from downloading
__________________
JD-Dev & Server-Admin |
#8
|
||||
|
||||
@Dockel: could you please create a log when this happens, so I can see the underlying reason/cause of the incomplete download
__________________
JD-Dev & Server-Admin |
#9
|
|||
|
|||
OK, a script, thank you, Jiaz.
Quote:
One reason might be that I had activated the last option: And another reason: when there are slow downloads and I start downloads from e.g. zippe, mega, YouTube, hosters without limitations or low ones slow downloads of some hosters do not get enough bandwidth anymore. So the fast download hosters (mega, zippy, etc.) then use as much as they can.
__________________
Aktuelles Windows |
#10
|
|||
|
|||
Quote:
To reproduce, create a package with 4 mirror links. Start the download. (This would most likely start the first link in the list). Stop the download and move the partially downloaded link to the bottom of the package and then start the downloads again. Instead of starting the partially downloaded link (which is now last link in the package), JD will start downloading the file from scratch from a new host, (most likely the first link in the package in this case). The issue has also been reported in the past by a few other users. |
#11
|
|||
|
|||
@Dockel: The script will disable all mirrors of a link, if at least 50% of the file has been downloaded.
Code:
/* Disable mirror links Trigger : A Download Started */ if (link.resumeable) { while ( link.running && link.bytesLoaded / link.bytesTotal < 0.50 // 0.50 = 50% ) { sleep(10000); } if (link.running) { var comment = "Disabled mirror"; link.package.downloadLinks.forEach(function(link2) { try { if ( link2.name == link.name && link2.conditionalSkipReason.className == "MirrorLoading" ) { link2.enabled && (link2.enabled = false); link2.comment != comment && (link2.comment = comment); } } catch (e) {}; }) } } Last edited by mgpai; 11.06.2021 at 10:39. Reason: Modified as per request in Post #25 |
#12
|
|||
|
|||
Quote:
Quote:
Many thanks again!
__________________
Aktuelles Windows Last edited by Dockel; 10.06.2021 at 14:05. |
#13
|
|||
|
|||
That was just an example. A different mirror could be started by JD based on the position of the link in the list or other criteria like captcha, resumeable etc.
|
#14
|
|||
|
|||
Yes, OK. But generally it seems JD does not take the fastest downloads or the ones without captchas instead of the others.
__________________
Aktuelles Windows |
#15
|
||||
|
||||
JDownloader tries to reduce captchas and prefers hosters that signal that no captcha is required. It also prefers Premium->Multihoster->Free->No Account order if no custom order is setup. JDownloader has no knowledge about *fastest download* and therefore speed is no part of any decision
__________________
JD-Dev & Server-Admin |
#16
|
|||
|
|||
Ah, OK, So you have to arrange the mirror list yourself by the fastest downloads on top.
__________________
Aktuelles Windows |
#17
|
||||
|
||||
You should work with priorities (eg manually or via packagizer rules) as the order is just another hint for *next downloadlink* selection but priority has more weight in it
__________________
JD-Dev & Server-Admin |
#18
|
|||
|
|||
Priority? These ones?
How can one do this with packagizer rules?
__________________
Aktuelles Windows |
#19
|
|||
|
|||
Priority? These ones?
How can one do this with packagizer rules?
__________________
Aktuelles Windows Last edited by Jiaz; 10.06.2021 at 15:03. |
#20
|
||||
|
||||
??
Settings -> Packagizer: If <yourCondition> (e.g. "if downloadurl contains "zippyshare.com") -> Then set -> Priority -> Your wished priority This only works for all URLs added AFTER creating that rule! -psp-
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#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 09: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 14: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 | |
|
|