#2581
|
|||
|
|||
![]()
I would like to ask for assistance in creating an event script that will move the extracted files and folders from my extraction folder "/output/EXTRACTED" folder to the "/output/FILEBOT" folder.
My attempt, which you can see below, doesn't move the folders. Can you please help me edit the script so that it also moves the folders or alternatively removes the left behind empty folders. Code:
/* Move extracted files Trigger: Archive extraction finished */ var destination = "/output/FILEBOT"; archive.extractedFilePaths.forEach(function(filePath) { filePath.moveTo(destination); }) |
#2582
|
||||
|
||||
![]()
__________________
JD Supporter, Plugin Dev. & Community Manager Erste Schritte & Tutorials || JDownloader 2 Setup Download ----------------------------------- On Vacation / Im Urlaub Start: 2023-12-09 End: TBA |
#2583
|
|||
|
|||
![]()
@pspzockerscene:
My first approach was to use Packagizer with the parameters "Match on any file and ignore conditions below" and "Move to". This works in principle, but unfortunately some files e.g. .idx or .sub as well as the empty folders remain. They should be moved aswell. |
#2584
|
||||
|
||||
![]()
Sounds like a possible bug.
Please provide example URLs which can be used to reproduce this issue.
__________________
JD Supporter, Plugin Dev. & Community Manager Erste Schritte & Tutorials || JDownloader 2 Setup Download ----------------------------------- On Vacation / Im Urlaub Start: 2023-12-09 End: TBA |
#2585
|
|||
|
|||
![]()
I read all 130 sides of this topic and a lot of other topicas as well. As far as I understand it, Packagizer is not designed to move folders, but only files. Every time someone made a request to process folders, it was referred to the Eventscripter since Packagizer wouldn't be capable of it.
What kind of URLs do you want? Downloads links for the mentioned packages? I don't want to post anything which is not compliant with your rules. |
#2586
|
||||
|
||||
![]() Quote:
Sorry - please ignore my reply #2584. EDIT I've created a ticket for this since it has been requested by other users too throughout the years. Ticket:
__________________
JD Supporter, Plugin Dev. & Community Manager Erste Schritte & Tutorials || JDownloader 2 Setup Download ----------------------------------- On Vacation / Im Urlaub Start: 2023-12-09 End: TBA Last edited by pspzockerscene; 23.03.2023 at 14:48. |
#2587
|
|||
|
|||
![]()
Hi I'm trying to write a script (I don't know JavaScript unfortunately) so that I organize my downloads from jDownloader which is running as Docker on my Unraid.
The goal is to have the unpack path set to a specific path after a successful download. If the %packegename% ends with "_program" for example, then it should be exported to "/mnt/jDownloader/extracted/programs". So I want to save myself moving and in addition the whole thing over unraid with python doesn't work so well therefore directly under jdownloader using javascript. I had something generated by ChatGPT, however that doesn't really work. Maybe someone of you can help me. Thanks already! // Trigger: Package Finished // Customize the script to your needs if (package.getArchives() && package.getArchives().length > 0) { var archive = package.getArchives()[0]; var packageName = package.getName(); var basePath = "/mnt/jDownloader/extracted/"; // Adjust the condition to match the desired pattern if (packageName.lastIndexOf("_program") === packageName.length - "_program".length) { var subFolder = "Program"; outputPath = basePath + getPathSeparator() + packageName; } else if (packageName.lastIndexOf("_game") === packageName.length - "_game".length) { var subFolder = "Programs/Games"; outputPath = basePath + subFolder + getPathSeparator() + packageName; } else { outputPath = basePath + getPathSeparator() + packageName; } archive.getSettings().setExtractPath(outputPath); } |
#2588
|
||||
|
||||
![]()
@itsVeto
If you do not care about running/incomplete downloads, you could simply let JD download them to the final destination right away. You could use a Packagizer rule to do stuff like "if package name contains 'xy' then set download destination to <path>". However if you want to download your items to location A first and then move them to location B, you will need an EventScripter script or an external application to do this.
__________________
JD Supporter, Plugin Dev. & Community Manager Erste Schritte & Tutorials || JDownloader 2 Setup Download ----------------------------------- On Vacation / Im Urlaub Start: 2023-12-09 End: TBA |
#2589
|
|||
|
|||
![]() Quote:
Leider habe ich wohl einen Fehler. Kannst du mal drüber schauen? Ich kann wohl keine screenshots teilen. Zumindest sehe ich diese selbst nicht. **External links are only visible to Support Staff****External links are only visible to Support Staff** Das ganze habe ich natürlichj auch ohne regex mit *_spiel versucht. Es wird im standard ordner geladen und entpackt. Auch der Kommentar den ich zum testen gesetzt habe, funktioniert nicht. Somit scheint die Bedingung nicht treffend. **External links are only visible to Support Staff****External links are only visible to Support Staff** Obwohl der Paketname ja eindeutig stimmt. Last edited by itsVeto; 24.03.2023 at 13:55. |
#2590
|
||||
|
||||
![]() Quote:
Bitte warte auf die Antwort von anderen Usern oder Teammitgliedern. Quote:
URLs sind hier standardmäßig nur für Mods sichtbar. Falls du welche für alle sichtbar haben willst, entferne das Protokoll von der URL (den Anfang mit "http...").
__________________
JD Supporter, Plugin Dev. & Community Manager Erste Schritte & Tutorials || JDownloader 2 Setup Download ----------------------------------- On Vacation / Im Urlaub Start: 2023-12-09 End: TBA |
#2591
|
|||
|
|||
![]() Quote:
|
#2592
|
||||
|
||||
![]()
Einstellungen -> Paketverwalter -> Hinzufügen
Paketname -> Enthält -> Deine Dateinamens-Bedingung ... dann setze Downloadordner -> Dein Wunsch-Downloadordner EDIT (Paketverwalterregeln greifen nur für alle danach hinzugefügten Elemente!)
__________________
JD Supporter, Plugin Dev. & Community Manager Erste Schritte & Tutorials || JDownloader 2 Setup Download ----------------------------------- On Vacation / Im Urlaub Start: 2023-12-09 End: TBA Last edited by pspzockerscene; 24.03.2023 at 17:30. Reason: Mehr Infos ergänzt |
#2593
|
|||
|
|||
![]()
Siehst du das bild von meinem vorherigen Post? Ich habe das eigentlich genau so erstellt..
|
#2594
|
||||
|
||||
![]()
Ja ich sehe deinen Link zum Screenshot. Das sollte so funktionieren.
Nur wie bereits gesagt: Damit kannst du Downloadordner vor dem Download setzen - keine speziellen Entpackordner oder Ordner, in den die Dateien nach dem Download verschoben werden. Deine Regel sollte immer greifen, wenn ein Paket mit dem Name "Spiel" eingefügt wird. Bedenke, dass die Regel nicht greift, wenn du z.B. bestehende Pakete umbenennst - sie greift nur 1x indem Moment, in dem die Links hinzugefügt werden.
__________________
JD Supporter, Plugin Dev. & Community Manager Erste Schritte & Tutorials || JDownloader 2 Setup Download ----------------------------------- On Vacation / Im Urlaub Start: 2023-12-09 End: TBA Last edited by pspzockerscene; 24.03.2023 at 18:42. Reason: Tippfehler fixed |
#2595
|
|||
|
|||
![]() Quote:
Leider steht in der Anleitung, dass das ganze VOR dem downloaden greift. Hat man eine Möglichkeit die dlc Dateien vor dem hinzurügen zu benennen? |
#2596
|
||||
|
||||
![]()
Jein.
Nochmal: Die Regeln sind dafür gedacht, Pakete/Dateien beim Einfügen automatisch unzubenennen/einzusortieren/whatever. Man kann also sagen es gibt genau einen Zeitpunkt zu dem sie greifen: "Beim" Einfügen in den Linkgrabber. Wenn du deine Links z.B. nicht per Zwischenablagenüberwachung sondern über Linksammler -> links unten "Links hinzufügen" einfügst und dort z.B. in das Paketnamenfeld "blabla spiel" reinschreibst, würde deine Regel ebenso gelten, aber eben nicht, wenn du ein Paket einfügst und es später umbenennst. Wenn der Packagizer nicht für deine Zwecke ausreicht oder du komplexere Dinge tun möchtest, wirst mit EventScripter Scripten arbeiten müssen. Quote:
Natürlich kannst du einen DLC Container beliebig benennen und ja du kannst per Packagizer Regel auch dafür sorgen, dass z.B. alle Links im eingefügten Container in einem Paket landen, das nach dem DLC-Container-Dateiname benannt ist. Ich verabschiede mich jetzt ins Wochenende. Bitte erwarte keine weiteren Antworten von mir vor Montag.
__________________
JD Supporter, Plugin Dev. & Community Manager Erste Schritte & Tutorials || JDownloader 2 Setup Download ----------------------------------- On Vacation / Im Urlaub Start: 2023-12-09 End: TBA |
#2597
|
|||
|
|||
![]()
Hello,
I am currently trying to crawl a tiktok account and wish to not do it manually. Sometimes the user will post videos and would sometimes delete them. I'm trying to write a script that will search for the tiktok profile link provided then download the link if found. Basically, a refresh of the link so it will get the most up to date video. I've read upon @pspzockerscene's report at (https://board.jdownloader.org/showth...314#post511314). There he says, "Now you could add that profile URL every day to update your personal library of clips of that profile. While JDownloader does not support that out of the box, you could also automate this process using an EventScripter script" I am in the process of writing the script but i am running to a problem. Here is my current script. -------------------------------- }; // Define the link to search for var link = "**External links are only visible to Support Staff**; // Search for the link in JDownloader var linkFound = false; var linkList = getAllDownloadLinks(); for (var i = 0; i < linkList.length; i++) { if (linkList[i].getURL() == link) { linkFound = true; break; } } // If the link is found, start the download if (linkFound) { var dl = createDownload(link, "Downloads"); dl.start(); } -------------------------------- Error: ReferenceError: "DownloadLink" is not defined. (#2) Let me know if there are easier ways to do this, and let me know how i should rewrite the script. Thanks. |
#2598
|
|||
|
|||
![]() Quote:
For some reason, my script runs but nothing happens. Links are in the txt file and address is also correct. Does this script still work? |
#2599
|
|||
|
|||
![]()
@samoreye: What trigger do you use for that script? Seems it is incomplete because it starts with }; ?
The error means that you use variable DownloadLink which is unknown |
#2600
|
||||
|
||||
![]()
Merged EventScripter Threads.
__________________
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 | |
|
|