#2161
|
|||
|
|||
|
#2162
|
|||
|
|||
Ah, that is great! Many thanks!
I did some mistake, I have it like this now: But nothing happens. Could the script automatically open the htm file in the standard browser / JD uses for the capchas? And could it mark (e.g. with another color) the items being duplicates by size?
__________________
Aktuelles Windows Last edited by Dockel; 29.04.2022 at 19:53. |
#2163
|
|||
|
|||
Screenshot shows you have added the button to the context menu. Add it to the main toolbar. Also note, you can change the position of the button using drag 'n' drop after adding it.
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); openURL("file://" + file); } } Setting collors not (yet) supported in eventscripter. |
#2164
|
|||
|
|||
Quote:
Unfortunately I am not abel to, I always get a wrong option: Great, many thanks for the edition! Quote:
__________________
Aktuelles Windows |
#2165
|
|||
|
|||
It can also work with context menu button, but you will have to it also set it as trigger in the eventscripter drop down panel. Context menu scripts are normally used when working with link/package selection. In this case, toolbar button in more suitable.
You have to add Eventscripter Trigger button NOT Eventscripter button. Former is used to execute scripts, while the latter is used to enable/disable the extension. No such options currently exist. |
#2166
|
|||
|
|||
Quote:
Quote:
Looks so now: After clicking the new button this is shown: I clicked OK and nothing seems to happen. Quote:
__________________
Aktuelles Windows |
#2167
|
|||
|
|||
Change ‘Gateway’ to show domain only
Hi,
I’ve never used Event Scripter before, I’m willing to learn though. I use proxies that require username and password. By default JDownloader displays the following in the ‘Gateway’ tab in the ‘Downloads’ section when I use a proxy: <username>:<redacted-password>@subdomain.mydomain.com This is fine for most users, however, my username and passwords are a huge string of characters. The problem is that I have to make the ‘Gateway’ tab very big and it takes up all of the space. I would like the ‘Gateway’ tab to display the following instead: Subdomain.mydomain.com I don’t want it to show my huge username, or even the asterisk, which it displays as the password. Can this be done? Any ideas on what I should be looking at changing? |
#2168
|
||||
|
||||
@makeszerosense: I will change it to only contain host and not contain user/pass(asterisk) at all. Wait for next core update
__________________
JD-Dev & Server-Admin Last edited by Jiaz; 02.05.2022 at 12:05. |
#2169
|
|||
|
|||
Hi,
I have a very simple question, but I did not find the answer. Is it possible to save the contents of the clipboard in the comment field when capturing links Thanks |
#2170
|
||||
|
||||
@MKey: Not out-of-the-box and also not recommended as it would not be the expected result. JDownloader parses the clipboard in several flavors and parses them all, so clipboard contains String representation, HTML representation, HTML selection...
Also this would increase memory usage alot! What exactly do you have in mind? What do you really want from clipboard?
__________________
JD-Dev & Server-Admin |
#2171
|
|||
|
|||
Amazing. Thank you
|
#2172
|
|||
|
|||
Sorry for a long time did not come in.
When copying links to the clipboard, I also copy information with the description And I would like this description to be attached to the package or link Thanks |
#2173
|
||||
|
||||
@MKey: hmm, in what format do you copy the information? you could for example add the information as anchor and similiar to this https://support.jdownloader.org/Know...ame-via-anchor but modify comment instead of name
__________________
JD-Dev & Server-Admin |
#2174
|
|||
|
|||
Thanks, this is not exactly what I need, but you gave me an idea, I'll try to do something with crawljob files.
But it would be great if you could add one more variable Event Scripter something like "getclipboard". Thanks again. |
#2175
|
||||
|
||||
@MKey: you can access the CrawlerJobSandbox object and there you have getText() method which contains the clipboard content that is used for that round. For example you can create a script for "Packagizer Hook", myPackagizerLink.getCrawledLink().getSourceJob()
__________________
JD-Dev & Server-Admin |
#2176
|
|||
|
|||
Quote:
Could you please help modify this script to delete all links that older than 365 days (not only delete finished links, but also delete skipped links, temporarily unavailable links, server errors 403 links,... ) I want to clear all old links so Jdownloader run faster. Thank you! Last edited by TomNguyen; 08.05.2022 at 18:01. |
#2177
|
|||
|
|||
Quote:
Code:
/* Remove old links Trigger : JDownloader Started */ var days = 365; var now = new Date(); var cutoff = days * 24 * 60 * 60 * 1000; var linkIds = []; getAllDownloadLinks().forEach(function(link) { if (now - link.addedDate > cutoff) { linkIds.push(link.UUID); } }) if (linkIds.length) { callAPI("downloadsV2", "removeLinks", linkIds, []); } |
#2178
|
|||
|
|||
Quote:
Thank you so much for quick reply, mgpai. |
#2179
|
|||
|
|||
Jiaz empfahl mir hier zu schreiben:
Das Problem ist in folgendem Test kurz beschrieben. Für einen Profi sicher schnell und einfach lösbar. Danke im Voraus! Falls ein Paket aus mindestens zwei Teilen (files) besteht, sollte es aufgeklappt erscheinen, damit alle "Teile" sichtbar sind. Bei nur einem enthaltenen Link reicht die Anzeige des Paketnamens völlig aus. So hatte ich das immer gehandhabt. Beim Hinzufügen neuer Links habe ich das immer so eingestellt. Urplötzlich änderte sich (warum auch immer, ich weiß es nicht) die Situation und jetzt habe ich das beschriebene Problem, würde aber gerne zurück. Macht der Gewohnheit! Es soll ja nur bei Paketen mit mindestens zwei Links passieren. Falls ihr hier helfen könnt wäre ich euch ewig dafür dankbar. Edit by Jiaz: Reference https://board.jdownloader.org/showthread.php?t=90573 Last edited by Jiaz; 13.05.2022 at 14:22. |
#2180
|
|||
|
|||
Anyway to fix HLS stream broken? for vidmoly.to.
it use to download without any problem now it's not downloading anything. |
#2181
|
||||
|
||||
@Wolfin2010
You're wrong in this thread! Please report this issue in this subforum and provide all required details such as a problem description, example links and a log. -psp-
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#2182
|
|||
|
|||
Quote:
Code:
/* Set package expanded state Trigger : JDownloader Started */ getAllFilePackages().forEach(function(package) { var single = package.downloadLinks.length == 1; single && package.expanded && package.setExpanded(false); !single && !package.expanded && package.setExpanded(true); }) |
#2183
|
|||
|
|||
Quote:
Is it possible if we grouped the links of the same size into a specified folder in the linkgrabber? For the folder name, maybe can just use the name file from the first link checked. Also is there another way to check duplicates beside of the file name and the file size? Thank you |
#2184
|
|||
|
|||
Quote:
Grouping only by size can break multi-part archives. Links belonging to different archives could end up (wrongly) in the same package. JD already tries to detect mirrors and group them in the same package. This auto-grouping feature can break if the package name is set by a custom rule. Can you provide any example url where you want the resulting links to be grouped in the same package, but they currently end up in separate packages? Checksums can also be used, but unfortunately not all hosters provide them. In some cases, grouping the links by container url (originating from same url) may help. |
#2185
|
|||
|
|||
script: Move finished non-archive files, to user defined folder
In the following script:
- Is there a way to get the "PackageName" path ( instead each links path...) and move the complete PackageName ? ( in other words, move the complete sub-folder packagename ) ( The below script works but the subfolder(PackageName ...package sub folder is not moved. Only files inside package are moved to destfolder. So I am looking to find a solution to get move the complete package...) Thanks in advance Code: // Move finished non-archive files, to user defined folder // Trigger required: "A Download Stopped" var destFolder = "D:/Jdl_Finished_packages"; if (link.isFinished() && !link.getArchive()) { getPath(link.getDownloadPath()).moveTo(destFolder); } |
#2186
|
|||
|
|||
Hey I need a script that'll copy and paste the source URL to comments since we can't search through URLs. Thanks!
|
#2187
|
||||
|
||||
@RedNapalm: what *source URL* are you referring to? In JDownloader there are several sources known, see https://support.jdownloader.org/Know...iew-added-urls
eg source can be the browser tab URL, also can be the container url or the linkshortener. can you explain what you have in mind/what you're trying to achieve, then we can help you better.
__________________
JD-Dev & Server-Admin |
#2188
|
|||
|
|||
Um, hi. I would like to ask for a script that would insert a folder into mega.nz folder structure if possible.
Specifically, what I'm trying to download from mega is structured in a\b\c\d. I want to insert a folder and make it like this: a\INSERT FOLDER HERE\b\c\d. The name there will be a static folder name. Is that possible? Thank you. |
#2189
|
||||
|
||||
@mgpai: see my idea https://board.jdownloader.org/showpo...36&postcount=2 for @onyhow
__________________
JD-Dev & Server-Admin |
#2190
|
|||
|
|||
Code:
/* Set download folder Trigger: Packagizer Hook */ if (state == "AFTER" && link.host == "mega.co.nz") { var insert = "string"; var folder = link.downloadFolder.split("/"); folder.splice(1, 0, insert); link.downloadFolder = folder.join("/"); } |
#2191
|
||||
|
||||
@mgpai: don't you have to reassign to folder?
Quote:
__________________
JD-Dev & Server-Admin |
#2192
|
|||
|
|||
No. The splice() method overwrites the original array.
|
#2193
|
||||
|
||||
Once reason why I ...don't like it :p
__________________
JD-Dev & Server-Admin |
#2194
|
|||
|
|||
Quote:
Could you please help modify this script to give HIGHEST priority for files smaller than 100MB (and if possible, give HIGHER priority for files size from 100MB to 1GB), then other files (bigger than 1GB) are random download order (random "HIGH", "DEFAULT", "LOW", "LOWER", "LOWEST" priorities). I want Jdownloader to download small files such as ebooks and audio files first, then movie later. Downloading big file take long wait time, especially with free download, so it would be great to get the big files later when all other small files have been downloaded. Thank you! Last edited by TomNguyen; 31.05.2022 at 18:05. |
#2195
|
|||
|
|||
Quote:
Code:
/* Set priority Trigger: Download controller started */ getAllDownloadLinks().forEach(function(link) { if (!link.finished && link.bytesTotal > -1) { var size = link.bytesTotal / 1e6; var priority = size < 100 ? "HIGHEST" : size < 1000 ? "HIGHER" : random(); link.priority != priority && (link.priority = priority); } }) function random() { var array = ["HIGH", "DEFAULT", "LOW", "LOWER", "LOWEST"]; var index = Math.floor(Math.random() * array.length); return array[index]; } |
#2196
|
||||
|
||||
@mgpai: mgpai shooting scripts as it's "The Easiest Thing in the World"
__________________
JD-Dev & Server-Admin |
#2197
|
|||
|
|||
Quote:
It works great, script master! Quote:
Thanks again, mgpai! |
#2198
|
|||
|
|||
Quote:
Update: It works! Thanks! Last edited by onyhow; 01.06.2022 at 16:37. Reason: Update |
#2199
|
|||
|
|||
my sc card crashed a few days ago and i had to restore an backup from 2021 where i used jdownloader without event scripter. now i can't install/enable it. i opened the webinterface of my jdownloader headless install (raspberry pi 3) and clicked to "install". now it loading and loading and loading. jdownloader was updated and restarted before.
can i install/enable event scripter using the command line? |
#2200
|
||||
|
||||
@Tomrich: I would recommend to check/fix the installation, see https://support.jdownloader.org/Know...r-installation
then install the eventscripter via webinterface , hit the button, and then restart JDownloader
__________________
JD-Dev & Server-Admin |
Thread Tools | |
Display Modes | |
|
|