#981
|
|||
|
|||
![]()
Hello.
I'm now trying to put the Scripts vom #950 and #954 together. Is it possible to get the directory path from the JD2/cfg/* directory, were the other databese are hold or is it really necessary to put a absolute Path in there? Bye, Christian |
#982
|
|||
|
|||
![]() Quote:
Code:
var list = "c:/downloads/finished.txt"; // <- Set path to history file You can use any valid path. It can also contain variables. To set the 'cfg' folder as directory path, you can use: Code:
var list = JD_HOME + "/cfg/finished.txt"; // <- Set path to history file |
#983
|
|||
|
|||
![]() Quote:
Here it is : https://board.jdownloader.org/showpo...88&postcount=1 And don't worry, no one forbid you to have a life ![]() |
#984
|
||||
|
||||
![]()
mgpai,
How do I set an event script to auto-resume partially downloaded files while JD2 is running? Example: I have a list of 10 files in the download queue and it is simultaneously downloading one or two files, but at some point 2 or 3 of those files will have stopped at any given point with an error of "invalid download directory" so I have to manually right-click-resume and they will automatically complete successfully while JD2 is running, otherwise they will remain incomplete(partially downloaded). I think a 60-second wait is more than an ample wait-time. So basically; set an auto-resume flag for partially downloaded non-resumable links with a 60-second wait time. Minus the 60-sec wait, would this work? var links = getAllDownloadLinks(); for (i = 0; i < links.length; i++) { var link = links[i]; if (link.getBytesLoaded() == 0) link.setSkipped(true); } startDownloads(); Last edited by RPNet-user; 13.10.2019 at 18:16. Reason: added script sample |
#985
|
|||
|
|||
![]() Quote:
Code:
// Unskip and start downloading links with "Invalid download directory" message, if the destination folder is available. // Trigger : A Download Controller Stopped getAllFilePackages().forEach(function(package) { package.getDownloadLinks().forEach(function(link) { if (link.getSkippedReason() == "INVALID_DESTINATION") { if (getPath(package.getDownloadFolder()).exists()) { link.setSkipped(false); if (!isDownloadControllerRunning()) startDownloads(); } } }) }) I would not recommend using 'interval' unless you have to, especially if you are having a lot of links. You may end up needlessly iterating through the list using up valuable system resources. Also, the error might be symptomatic of hardware issues. It might be better to fix the underlying cause. If you provide more information, Jiaz might be able to look into it. |
#986
|
||||
|
||||
![]()
Thanks, I already have a thread open on this, however, it is neither hardware nor permission related as this is only occurring when downloading files from only one host: "uploaded", and via the uploaded premium account; uploaded links that are generated via the rpnet-multihoster account plugin does not cause the issue.
So I will enable this script only when downloading "uploaded" links and the uploaded account is enabled since I currently have it as a priority over my multihoster account under account usage rules. |
#987
|
|||
|
|||
![]() Quote:
Code:
// Unskip and start downloading links with "Invalid download directory" message, if the destination folder is available. // Trigger : Download Controller Stopped var accountEnabled = callAPI("accounts", "queryAccounts", { "enabled": true }).some(function(account) { return account.hostname == "uploaded.to" && account.enabled; }) if (accountEnabled) { getAllFilePackages().forEach(function(package) { package.getDownloadLinks().forEach(function(link) { if (link.getSkippedReason() == "INVALID_DESTINATION") { if (getPath(package.getDownloadFolder()).exists()) { link.setSkipped(false); if (!isDownloadControllerRunning()) startDownloads(); } } }) }) } Last edited by mgpai; 13.10.2019 at 23:00. Reason: Corrected the description in script |
#988
|
||||
|
||||
![]()
thank you mgpai, that one is even better since i would not have to enable/disable it every time i enable the uploaded account.
|
#989
|
||||
|
||||
![]()
@RPNet-User: please see your other thread. create a log for that error. There must be a reason for this and not *workaround* by unskipping
![]()
__________________
JD-Dev & Server-Admin |
#990
|
|||
|
|||
![]()
mgpai,
Not sure if this is the right place to post this question... Jiaz told me you were very talented with eventscripter and jdownloader and said that you would be the one I should contact. ![]() It would be very helpful if J-downloader could automatically check a you tube channel and download any new videos that have been posted. This would save a lot of time if a channel has hundreds of videos on it, so that we would not have to sort through the whole channel each time to find new updates. How would I go about doing this? Are you able to build a script plug in which would enable this feature? Thank you for your help |
#991
|
|||
|
|||
![]() Quote:
Code:
gist.github.com/mgpai/09252b6b72828c290fd141da81be14a1/download |
#992
|
||||
|
||||
![]()
Merged EventScripter threads.
-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager Erste Schritte & Tutorials || JDownloader 2 Setup Download ----------------------------------- On Vacation / Im Urlaub Start: 2023-12-09 End: TBA |
#993
|
|||
|
|||
![]() Quote:
In the meanwhile you can prevent, or atleast reduce the chance of using the same GEO-Blocked connection for the hoster, by setting "GeneralSettings.freeproxybalancemode" to "RANDOM". Last edited by raztoki; 16.10.2019 at 00:42. Reason: spelling and grammar |
#994
|
||||
|
||||
![]()
mgpai,
Neither one of these scripts are working, I'm still having to manually right-click and resume. No issue of any missing directory as I was able to resume them immediately after the error and the download completes them without issues. Last edited by RPNet-user; 18.10.2019 at 09:10. Reason: added information |
#995
|
|||
|
|||
![]() Quote:
Quote:
Code:
webchat.freenode.net//#jdownloader?nick=JD_00? |
#996
|
||||
|
||||
![]() Quote:
Ignore my previous post, the script does work, I just didn't know that it waits till the end of the downloads and then required a one time script permission prompt to run. In my impatient mind, I was thinking that the script would unskip and resume immediately just after the invalid directory error. See screenshot, all those partial downloads were invalid directories before the script permission prompt at the end of the completed download queue. By the way, just before the error messages, I know it will happen every time because the download bandwidth drops down to "0" just before the invalid download directory message error occurs, which is only caused by "uploaded" premium account downloads. |
#997
|
|||
|
|||
![]() Quote:
The first thing I see in the script: What is with mirror links? As I can see, you use "link.isFinished", that event is only triggert for the link that is really downloaded. How do you handle mirror-links? With what event is the Script triggert? Maybe you can put some more comments in for explanation, please. bye, Christian |
#998
|
|||
|
|||
![]()
@pspzockerscene Were you aware that the discussion was purposefully not posted in this thread as asked by Jiaz and this is a conscious decision or did you merged it ignoring Jiaz made this request ?
@Amiganer I have basically done the script which write finished downloads now, I am already in the commenting phase (as it is a small and simple script I didn't needed to comment it while writing it) be prepared as I have close to no experience with commenting my code for sharing it, so I don't know if it will end up correctly or with too much or not enough informations. I have no idea what to do with mirror links as I haven't found any way to get one to experiment with them. Since the thread have been merged back again I won't update too much to not overload this general use thread with my script progress. I have few other things going on so the script isn't progressing super fast but it is still in my priorities. The part 1 (Writing finished downloads) use "A Download stopped" trigger. If I got my hand on a pair of links that will be consider as mirror by JD, I'll test out the necessary code to handle them if required. Edit : Nevermind, I found a valid mirror, I'll experiment tomorrow with them. Edit 2 : For what I see there will be two things I'll add, first, when a download finish, an option to check for their mirrors (as they don't trigger "A Download stopped") in the same package. And a third script which will work with right click on a download to add it to the history list, it won't be long to code as it will basically pretty much the same as the one for finished downloads, except it won't check for mirrors or if it is finished to lets the user add whatever URL he want. Last edited by Demongornot; 21.10.2019 at 14:25. |
#999
|
||||
|
||||
![]()
@Demongornot: pspzocker didn't know about the decision and just merged it back by accident
![]()
__________________
JD-Dev & Server-Admin |
#1000
|
||||
|
||||
![]() Quote:
-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager Erste Schritte & Tutorials || JDownloader 2 Setup Download ----------------------------------- On Vacation / Im Urlaub Start: 2023-12-09 End: TBA |
![]() |
Thread Tools | |
Display Modes | |
|
|