#2121
|
|||
|
|||
new to this is they a way to set download folder location since it only downloads to the default folder
example looking for youtube-url.txt = B:\\youtube-downloads reddit-url.txt = E:\\reddit-downloads i am using this version of the code Quote:
|
#2122
|
||||
|
||||
@mini_ash: you could move your links into a Crawljob file (use boardsearch) for the Folderwatch extension. There you can specify a download folder/package name for the links within the job.
else just specify additional "destinationFolder" Quote:
__________________
JD-Dev & Server-Admin |
#2123
|
||||
|
||||
More information about .crawljob files (and our Folder Watch addon): Click
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#2124
|
|||
|
|||
Hi, I heard this is a magical place in which we can request almost anything.
In this case, let me know if this is feasible. I have been reviewing the speediness of the process of my computer and I found that the download speed is optimised when there is no ongoing extraction of the previous completed package. For sample, when there is no extraction, I can have download up until 90-100Mb/s but when there is extraction, I can only have 5-8Mb/s average 1) Download in progress per package (meaning when 1 package is underway, no other package can be downloaded) 2) When the package downloaded is completed, then extraction will start (at this point no new package will start download) 3) Extraction completed and then next package will start download |
#2125
|
|||
|
|||
Code:
/* Stop dwonloads during extraction Trigger: Package finished */ var isExtracting = function() { return callAPI("extraction", "getQueue").length > 0; } if (isDownloadControllerRunning() && isExtracting()) { stopDownloads(); while (isExtracting()) { sleep(5000); } startDownloads(); } |
#2126
|
||||
|
||||
@mgpai: have you received my email about history idea?
__________________
JD-Dev & Server-Admin |
#2127
|
|||
|
|||
@Jiaz: Yes I have. Thank you.
Sorry I haven't replied yet. Thought I'll check it out first and then share my thoughts. Haven't got around to it yet. Will do soon. |
#2128
|
||||
|
||||
@mgpai: no need to hurry, just wanted to know if you've received an email
__________________
JD-Dev & Server-Admin |
#2129
|
|||
|
|||
Quote:
Thanks for your prompt action. It works but there is another point in my request that if it is possible to download 1 package at a time, so if there are 3 packages that each contains 2 files but my max simultaneous download are 5, it will only download 2 files from 1st package at this time. The reasoning of this is that when extraction is underway, the others files will not stop downloading right away and sometimes the process takes several minutes to completely stop. Also CRC checking also become extremely slow. ++ Also I found a bug, It works for the 1st file, but the process does not repeat again for the 2nd. I think it needs additional script line to repeat the process. Last edited by assoemitro; 11.03.2022 at 14:58. Reason: add more info + bug found |
#2130
|
|||
|
|||
Quote:
While this can be automated using a script, if the package does not finish downloading for any reason, the script will try to start the the same package in a loop and the list will not progress. It is better to use the default option and try to limit the active downloads using global/host connection limit. Quote:
Quote:
In any case, while the following 2 scripts will not limit the downloads to a single package, it will most likely achieve your objective, since it will stop active downloads when ANY extraction activity is detected. Let me know if you run into any issues. Code:
/* Stop downloads during extraction Trigger: Any extaction event */ isDownloadControllerRunning() && stopDownloads(); Code:
/* Start downloads after extraction Trigger: Archive extraction finished */ !callAPI("extraction", "getQueue").length && startDownloads(); |
#2131
|
|||
|
|||
[request] filename wrong
#1
linkgrabber k2s.cc site get filename =_utf-8_B_S29yaW5hIEtvdmEgLSBUcnV0aCBvciBEYXJlIFB0MiDQkeKUgOKMoCBUaGUgY2FyIHJpZGUgaG9tZS5tcDQ=_= =_utf-8_B_ start i know this need base64 to utf-8 i try Code:
var linkName if (link.getName() !== null) { //var extension = (linkName.match(/\.([^.]*?)(?=\?|#|$)/) || [])[1]; linkName = link.getName().replace(/(\s)?\/(\s)?/g, '/'); link.setName(linkName) if (linkName.match("%")) { link.setName(decURI(linkName)) } if (linkName.match(/=_utf-8_B_(.+)/)) { linkName = linkName.match(/=_utf-8_B_(.+)/).pop().replace('=_=', '') linkName = b64_to_utf8(linkName) link.setName(linkName) } } //link.setName(linkName + "." + extension); function UnescapeUTF8(str) { return str.replace(/%(E(0%[AB]|[1-CEF]%[89AB]|D%[89])[0-9A-F]|C[2-9A-F]|D[0-9A-F])%[89AB][0-9A-F]|%[0-7][0-9A-F]/ig, function(s) { var c = parseInt(s.substring(1), 16); return String.fromCharCode(c < 128 ? c : c < 224 ? (c & 31) << 6 | parseInt(s.substring(4), 16) & 63 : ((c & 15) << 6 | parseInt(s.substring(4), 16) & 63) << 6 | parseInt(s.substring(7), 16) & 63) }) }; function decURI(str) { var charCode = ""; if (str.match("%")) { try { charCode = GetEscapeCodeType(str); console.log(charCode) if (charCode == "UTF8") { str = UnescapeUTF8(str); } else if (charCode == "EUCJP") { //str = UnescapeEUCJP(str); } else if (charCode == "SJIS") { //str = UnescapeSJIS(str); } else if (charCode == "Unicode") { //str = unescape(str); } return str; } catch (e) { //throw(e); } } else { return str; } //throw new Error(); } function b64_to_utf8(str) { return decodeURIComponent(escape(window.atob(str))); } function GetEscapeCodeType(str) { if (/%u[0-9A-F]{4}/i.test(str)) return "Unicode"; if (/%([0-9A-DF][0-9A-F]%[8A]0%|E0%80|[0-7][0-9A-F]|C[01])%[8A]0|%00|%[7F]F/i.test(str)) return "UTF16LE"; if (/%E[0-9A-F]%[8A]0%[8A]0|%[CD][0-9A-F]%[8A]0/i.test(str)) return "UTF8"; if (/%F[DE]/i.test(str)) return /%8[0-9A-D]|%9[0-9A-F]|%A0/i.test(str) ? "UTF16LE" : "EUCJP"; if (/%1B/i.test(str)) return /%[A-D][0-9A-F]/i.test(str) ? "JIS8" : "JIS7"; var S = str.substring(0, 6143).replace(/%[0-9A-F]{2}|[^ ]| /ig, function(s) { return s.length < 3 ? "40" : s.substring(1) }), c, C, i = 0, T; while (0 <= (c = parseInt(S.substring(i, i += 2), 16)) && i < 4092) if (128 <= c) { if ((C = parseInt(S.substring(i, i + 2), 16)) < 128) i += 2; else if (194 <= c && c < 240 && C < 192) { if (c < 224) { T = "UTF8"; i += 2; continue } if (2 == parseInt(S.charAt(i + 2), 16) >> 2) { T = "UTF8"; i += 4; continue } } if (142 == c && 161 <= C && C < 224) { if (!T) T = "EUCJP"; if ("EUCJP" == T) continue } if (c < 161) return "SJIS"; if (c < 224 && !T) if ((164 == c && C < 244 || 165 == c && C < 247) && 161 <= C) i += 2; else T = 224 <= C ? "EUCJP" : "SJIS"; else T = "EUCJP" } return T ? T : "EUCJP" }; is correct?? #2 some file start download change encoding filename linkgrabber filename 사랑합니다.rar download start change %EC%82%AC%EB%9E%91%ED%95%A9%EB%8B%88%EB%8B%A4.rar #3 some archive extra filename is %EC%82%AC%EB%9E%91%ED%95%A9%EB%8B%88%EB%8B%A4 (korean japanese chinese) how to decoding? Last edited by dandyclubs; 23.03.2022 at 08:30. |
#2132
|
||||
|
||||
@dandyclubs: can you please provide example links to support@jdownloader.org
this can easily be fixed in the plugins themselves. No need for custom workaround #1 can easily be fixed in the plugin and #2 and #3 is a sign that the hoster does not correct signal encoding and plugin does not apply auto correct/guess
__________________
JD-Dev & Server-Admin |
#2133
|
|||
|
|||
#3 sevenzipjbinding extration
sevenzipjbinding
some zip file extration finished filename wrong encoding mac => korean window system... so use bandizip Code-page change Last edited by dandyclubs; 23.03.2022 at 14:59. |
#2134
|
||||
|
||||
@dandyclubs: I've replied to filename, yes, zip and unicode can cause issues because of local code page and zip may not be properly utf-8 filenames
__________________
JD-Dev & Server-Admin |
#2135
|
||||
|
||||
__________________
JD-Dev & Server-Admin |
#2136
|
|||
|
|||
Add an script/option to bind IP address per selected downloads in the list
Hello everyone,
Is it possible to create script to add an option/button in context menu to bind IP address per selected downloads? When using 2 networks, I want to set some selected folders in the "Downloads tab" to specific IP address ( ex. 190.186.1.1 ) So these selected folders will always use the specified IP address above ( without being limited to the host/site name ) This script/option for me is essential, for easy changing/binding between IP address, but nfortuantly I don't know how to do it :( Any help will be appreciated |
#2137
|
||||
|
||||
@thehulk14:
that is currently not possible/supported. are the downloads from different hosts? if yes, then you can already achieve this via black/white-listing in Settings->Connections. Only if the downloads are from same host, it's not possible yet.
__________________
JD-Dev & Server-Admin |
#2138
|
|||
|
|||
Quote:
Unfortunately it's the same host, I hope it will be supported in the upcoming updates. |
#2139
|
||||
|
||||
@thehulk14: when it's from same host, does it matter to be a specific IP or do you want to use 2 IPs in order to download two files at the same time? it's already possible to spread downloads from same host over multiple different connections
__________________
JD-Dev & Server-Admin |
#2140
|
|||
|
|||
Quote:
It actually does matter, since when using 2 IPs with 2 simultaneous connections ( example 1st IP 190.186.1.1, 2nd 190.186.1.2 ) and one of the file is finished (190.186.1.1), the next download will use the 2nd IP (190.186.1.2) instead of (190.186.1.1) Which will waste the downloading time.. Edit: updated the example IPs. Last edited by thehulk14; 09.04.2022 at 06:24. Reason: updated the example IPs. |
#2141
|
||||
|
||||
@thehulk14: What host is it? does the host allow multiple downloads per IP or just one?
I don't see any problem with existing settings to balance downloads over connections, the first download should use proxy A and the next one should use proxy B.
__________________
JD-Dev & Server-Admin |
#2142
|
|||
|
|||
Hi team!
Really loving JDownloader and finally have all my scripts set up properly. Just wondering whether this one would be possible? I have a folder link which is updated every week with new episodes, is there a script to automatically refresh the link and automatically add the new file at all? Thanks! |
#2143
|
||||
|
||||
@mgpai: I need your master brain for help I need a simple script. Links are in linkgrabber and the script should just iterate through the list and remove duplicates (same download url). I thought something like iterate through list and add each url to a map/set and in case it's already there, then we can remove the entry from list and continue with next one.
__________________
JD-Dev & Server-Admin |
#2145
|
|||
|
|||
Quote:
Will this do? Code:
/* Remove duplicate links Trigger : Toolbar button pressed */ if (name == "Remove duplicate links") { var urls = []; getAllCrawledLinks().forEach(function(link) { var url = link.contentURL || link.pluginURL; if (urls.indexOf(url) == -1) { urls.push(url); } else { link.remove(); } }) } |
#2146
|
||||
|
||||
@mgpai: you dream in script language, don't you nice&easy, thank you so much
__________________
JD-Dev & Server-Admin |
#2147
|
|||
|
|||
Hmm, ok will try it again and see.
|
#2148
|
|||
|
|||
haha.
My pleasure. |
#2149
|
|||
|
|||
Quote:
I'm not very familiar with the Packagizer function and having some trouble working out how to add 'new' links only and having them automatically download. Any further guidance on what variables I should be using? Thanks in advance! Here is my settings but I'm pretty sure it's wrong. Thanks again! |
#2150
|
|||
|
|||
Auto Confirm : Enabled (Sends links to the download list)
Enable Download : Link are enabled by default, so should not be required. |
#2151
|
|||
|
|||
event scripter getPage language broken
When the download is complete, you will receive a message via Telegram.
It can be used normally, but Korean and Japanese other than English are broken as "???". Doesn't getPage of getBrowser() support other languages? Here is the code I'm using. Code:
/* Event Script: Telegram notification when download completes Requirements: Trigger "Package Finished" */ var browser = getBrowser(); var apiToken = 'apiToken'; var chatId = 'chatId'; var url = "**External links are only visible to Support Staff**; if (package.isFinished()) { var reName = package.name.replace(/^_/g, ""); // korean package _ delete var linkList = package.getDownloadLinks(); var msg = "JDownloader" + "%0A" //enter + reName + " Download Finished" url += apiToken + "/sendMessage?chat_id=" + chatId + "&parse_mode=html&text=" + msg; browser.getPage(url); //telegram send getPath(package.getDownloadFolder()).delete(); //temp path delete package.remove(); //link delete } |
#2152
|
||||
|
||||
@qowmq: message must be correctly urlencoded, I will check how to do this
Update: you can use encodeURIComponent("string"), eg Quote:
__________________
JD-Dev & Server-Admin Last edited by Jiaz; 13.04.2022 at 16:33. |
#2153
|
||||
|
||||
@qowmq
Nice and simple
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#2154
|
|||
|
|||
thank you. Solved.
|
#2155
|
||||
|
||||
@qowmq: Thanks for the feedback and you're welcome
__________________
JD-Dev & Server-Admin |
#2156
|
|||
|
|||
Can I get some help for a script for a headless setup for Pushover notification? I would like to send a pushover notification on file download complete.
I found this script but not sure how to convert it to work for a headless script Code:
postPage("https" + "://api.pushover.net/1/messages.json", "token=appToken&user=userKey&message=" + package.getName() + " finished."); Last edited by runjayemcee; 16.04.2022 at 08:19. |
#2157
|
||||
|
||||
@runjayemcee: most easiest way is to use JDownloader with GUI and setup your eventscripter scripts and then copy/paste them via Settings->Advanced Settings->EventScripter.scripts
see https://support.jdownloader.org/Know...event-scripter "Headless / myjdownloader"
__________________
JD-Dev & Server-Admin |
#2158
|
|||
|
|||
A way / script would be great that could find / show / list duplicates (by content) in the downloadslist not having the same URL and / or name. Or at least files that might be duplicates by its size, if the bit size exactly is the same.
https://board.jdownloader.org/showth...473#post501473
__________________
Aktuelles Windows Last edited by Dockel; 29.04.2022 at 11:07. |
#2159
|
|||
|
|||
Quote:
Code:
/* List dupes by size Trigger : Toolbar button */ if (name == "List dupes by size") { var file = getPath(JD_HOME + "/tmp/dupes_by_size.htm"); var group = {}; var output = ""; getAllDownloadLinks().forEach(function(link) { var size = link.bytesTotal var name = link.package.name + " - " + link.name; group[size] = group[size] || []; group[size].push(name) }) for (x in group) { var names = group[x]; if (names.length > 0) { output += x + "\r\n\t"; output += names.sort().join("\n\t") output += "\r\n\r\n" } } if (output) { file.delete(); output = "<pre>" + output + "</pre>"; writeFile(file, output, false); } } |
#2160
|
|||
|
|||
Thank you very much! Very fast!
I have added it to the Event Scripter now: And now I have to add a button / menu item somehow e.g. in the Menu Customizer here: Sorry, I have forgotten how to do it. What do I have to do?
__________________
Aktuelles Windows |
Thread Tools | |
Display Modes | |
|
|