#681
|
|||
|
|||
Hi,
Jdownloader sometimes gets interrupted and downloads automatically stop Is there a script to start downloading if it gets stopped? |
#682
|
|||
|
|||
Hello @mgpai scriptmaster, I was referred to you in this thread - https://board.jdownloader.org/showth...367#post439367
I'm hoping you can help with this one. Basically I'm looking to auto-rename .rars from this site as well as the single .mp4 inside the rar after unpacked (there is always just one .mp4 file in the rars). Also, sometimes if it's small enough the download will just be a .mp4 and no rar. I'm looking to auto-rename in both cases when entered into linkgrabber (and for first one the extracted .mp4 as well). pastebin.com/DuBjEQYD .mp4 inside is named exactly as the rar package HTML Code:
www.0xxx.ws_ATKGirlfriends.19.04.08.Kenzie.Reeves.XXX.2160p.MP4-KTR.mp4 HTML Code:
HELLO123-ATKGirlfriends.19.04.08.Kenzie.Reeves.XXX.2160p.part1.rar So would be renamed to: HTML Code:
HELLO123-ATKGirlfriends.19.04.08.Kenzie.Reeves.XXX.2160p.mp4 If the download is small and just a .mp4 (not rard) , then I would just need linkgrabbed to remove "www.0xxx.ws_" from the front of the name and ".MP4-KTR" from the end (might be able to do this without a script but I can't figure out how to do the end part. ----- Sorry for the long wall of text and please let me know if you have any questions. Thanks in advance! Last edited by Jiaz; 09.04.2019 at 09:59. Reason: Please don't make links visible! Either PM them or send by mail |
#683
|
|||
|
|||
While possible, may not be practical. It will result in a infinite start/stop loop. The script also cannot distinguish between automatic and manual stop. You will hence not be able to stop the downloads manually when the script is active.
The downloads would have usually been stopped for good reason. It is better to find/fix the underlying issue which is causing the downloads to abort/stop. If you provide a log for when this happens, Jiaz might be able to look into it. If you still wish to use a script, just let me know. |
#684
|
||||
|
||||
@sherif011: please create a log, see https://support.jdownloader.org/Know...d-session-logs and open new thread and post the logID there
there must be a reason why downloads simply stop
__________________
JD-Dev & Server-Admin |
#685
|
|||
|
|||
Quote:
|
#686
|
|||
|
|||
OK will send you a ping. Tried messing around in packagizer and wasn't able to figure this out. Thanks
|
#687
|
|||
|
|||
Thanks @mgpai and @Jiaz
I had slow downloads and found another script running that restarts downloading when it becomes slow, so I had interrupted downloading. Thanks for your help. |
#688
|
||||
|
||||
@sherif011: Thanks for the feedback!
__________________
JD-Dev & Server-Admin |
#689
|
|||
|
|||
Quote:
|
#690
|
|||
|
|||
Quote:
You can use this script to create a custom toolbar button which can be clicked to detect/disable dupes. Code:
Code:
// Disable (instagram) links if file exists on disk // Trigger: Toolbar Buttton Pressed // Customaize Main Toolbar > Add New "Eventscripter Trigger" button > Rename it to "Disable Dupes" (without quotes/case-sensitive) if (name == "Disable Dupes") { getAllFilePackages().forEach(function(package) { if (package.isFinished()) return; package.getDownloadLinks().forEach(function(link) { if (link.isFinished()) return; if (!link.enabled) return; if (link.host != "instagram.com") return; if (!getPath(link.downloadPath).exists()) return; link.setEnabled(false); }); }); } Last edited by mgpai; 15.04.2019 at 12:03. Reason: Script re-written |
#691
|
||||
|
||||
@mgpai: thanks for nice solution. you could also check for status. for example finished status and skip those
or instead of getAllDownloads (which will create huge array), better use getAllPackages and then iterate through all of them via package.getDownloadLinks. much less memory usage then
__________________
JD-Dev & Server-Admin |
#692
|
|||
|
|||
|
#693
|
||||
|
||||
maybe also easy bypass ti check package.enabled to skip complete disabled packages
__________________
JD-Dev & Server-Admin |
#694
|
|||
|
|||
Quote:
|
#695
|
||||
|
||||
You're right, that method is not availabel in filepackage because it's meant to be checked on download links
__________________
JD-Dev & Server-Admin |
#696
|
|||
|
|||
Quote:
My download link is Code:
url#name=abc#pack=Pack 1 Code:
#pack= Could you please modify your original script to satisfy my purpose? Thank you so much! |
#697
|
|||
|
|||
Any reason you need to move the file? It should be possible to parse/set the download folder from your url (via packagizer/script) and download the file directly into it, instead of moving it later.
|
#698
|
|||
|
|||
Quote:
I want to sync only the downloaded files. Actually, I want to move the downloaded file to the folder named after the Package for which that file belongs. I tried this one but to no avail. Code:
if (link.isFinished() && !link.getArchive()) { var myFilePackage = package; getPath(link.getDownloadPath()).moveTo("C:/" & myFilePackage); } Last edited by leanhdung; 16.04.2019 at 12:53. |
#699
|
|||
|
|||
Try replacing:
Code:
getPath(link.getDownloadPath()).moveTo("C:/" & myFilePackage); Code:
getPath(link.getDownloadPath()).moveTo("C:/" + myFilePackage); If it still does not work, find me in JD Chat. Also note, this will only move non-archive files. |
#700
|
|||
|
|||
@leanhdung, you will also need to get the package name.
Replace: Code:
var myFilePackage = package; Code:
var myFilePackage = link.getPackage().getName(); |
#701
|
|||
|
|||
Quote:
Code:
if (link.isFinished()) { var myFilePackage = link.getPackage().getName(); getPath(link.getDownloadPath()).moveTo("D:/" + myFilePackage); } Code:
**External links are only visible to Support Staff** |
#702
|
|||
|
|||
Thank you so much for your dedicated help @mgpai
|
#703
|
|||
|
|||
Hi @mgpai
My Package 1 contains 20.000 links and it takes JDownloader very long to search for next possible download in list. In my case, after the download is complete, it takes Jdownloader up to 1 minute to search for the next download. I would like to ask if there is any way to speed up the process. Thank you so much |
#704
|
||||
|
||||
@leanhdung: this has nothing to do with Eventscripter (Offtopic) and I will answer in your other thread
__________________
JD-Dev & Server-Admin |
#705
|
|||
|
|||
Hi @mgpai. Can you let me know when you will be available to discuss this? And when you say jdchat do you mean JD IRC?
|
#706
|
|||
|
|||
Quote:
Code:
webchat.freenode.net/?channels=jdownloader I'll be available there for the next 8 hours or so, from the time of this post. |
#707
|
|||
|
|||
Thanks for your help today mgpai!
|
#708
|
|||
|
|||
I have 5 playlists from youtube I wish J2downloader kept downloading everyday because each day there's new videos being added to them. one of them is this one =
Code:
youtube.com/playlist?list=LLFbstz7sG9dQz4wM-KLJvSQ Code:
pastebin.com/S5PwPGWB Thanks! Last edited by heyfernand; 11.05.2019 at 22:04. |
#709
|
|||
|
|||
Script Nedded
Hi there,
I was today searching all over the internet for a script for this and nothing. Then since I use JD a lot I saw the events scripts function and maybe this could be the solution. I read all the 36 pages and nothing about this. I want to download only X Mb from all files I've in my JD. Since it reaches the x MB let say 50MB it would move to the next files, till finish all the JD filelist. Is it possible? Thanks! |
#710
|
||||
|
||||
@Tarantino: such a script doesn't exist to my knowledge. Try to ask mgpai for help. He would have to write a script that aborts/stops a download when certain amount of data got downloaded
__________________
JD-Dev & Server-Admin |
#711
|
|||
|
|||
Quote:
Code:
gist.github.com/mgpai/09252b6b72828c290fd141da81be14a1/download |
#712
|
|||
|
|||
@Jiaz: You have declined a similar request in past, stating such a script can also be abused, by downloading only partial content from OCH, in order to increase download count of a file. I cannot seem to find that thread though.
|
#713
|
|||
|
|||
Quote:
|
#714
|
|||
|
|||
Quote:
Code:
// Move archive files after extraction // Trigger: Archive Extraction Finished var links = archive.getDownloadLinks() || []; var timestamp = new Date().getTime(); links.forEach(function(link) { var filePath = getPath(link.getDownloadPath()); filePath.moveTo(filePath.getParent().toString().replace("JD Downloads", "!TRASH!/" + timestamp)); }); |
#715
|
|||
|
|||
Quote:
Thank you. |
#716
|
|||
|
|||
If you "want to download all the content", any particular reason you have to download it this way? If the hoster is imposing some kind of download/time limit, you can provide some example links and Jiaz might be able to check/fix it at plugin level.
|
#717
|
|||
|
|||
Quote:
I made very silly code but maybe its work? Can you help me? I put many comments so you can understand easy what I think. Code:
const MOVETODIR = "C:\\sherbee\\check"; //Set dir for move destination var links = archive.getDownloadLinks() || []; links.forEach(function(link) { var filePath = getPath(link.getDownloadPath()); var fileName = myFilePath.getName(); //Get name of file var fileExtension = myFilePath.getExtension(); //Get extension of file var fileMoveCheck = MOVETODIR + '\\' + fileName + "." + fileExtension; //Build absolute path to move destination dir if (!fileMoveCheck.exists()) { //Check if file exists in move destination dir filePath.moveTo(MOVETODIR); //If not exist then move } else { //If exist must make new name and try again var i = 0; //Counter for renaming do { i += 1; fileMoveCheck = MOVETODIR + '\\' + fileName + " (" + i + ")" + "." + fileExtension; // Make new name look like: C:\\sherbee\\check\\123 (1).zip like Windows. } while (fileMoveCheck.exists()); if (filePath.renameTo(fileMoveCheck)) { //Come here when file not exists and rename file filePath.moveTo(MOVETODIR); //After rename move } else { //do nothing or abort maybe } }); Last edited by sherbee; 14.05.2019 at 07:12. |
#718
|
||||
|
||||
Of course you are free to help with such a script. My comment was only that we(JDownloader) doesn't integrate such a feature. As a custom script for Eventscripter, I don't see a problem as we can't forbid/prevent such a script..here or anywhere else
__________________
JD-Dev & Server-Admin |
#719
|
||||
|
||||
@sherbee: yes, the loop should work, rename file, check exists and break loop once file doesn't exist.
__________________
JD-Dev & Server-Admin |
#720
|
|||
|
|||
Quote:
Best regards |
Thread Tools | |
Display Modes | |
|
|