JDownloader Community - Appwork GmbH
 

Notices

Reply
 
Thread Tools Display Modes
  #2561  
Old 23.02.2023, 15:18
pspzockerscene's Avatar
pspzockerscene pspzockerscene is online now
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,912
Default

Merged EventScripter threads.
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #2562  
Old 24.02.2023, 04:56
golddust golddust is offline
Modem User
 
Join Date: Feb 2023
Posts: 2
Default Skipping a duplicate with a different extension

Hello,

I would like to request a script where JDownloader would automatically skip the download of the same matching filename with a different extension.

Example -

If I have Apple.zip in my directory, and if JDownloader is about to download Apple.7z, it would skip the download.

It should work for any extension.

Thank you.

Last edited by golddust; 25.02.2023 at 08:22.
Reply With Quote
  #2563  
Old 24.02.2023, 17:51
Alexpark24 Alexpark24 is offline
Junior Loader
 
Join Date: Jan 2023
Posts: 13
Default

hello again,
will you have a script so that every time the link grabber is activated it performs a deep analysis every time I copy a link? thanks.
Reply With Quote
  #2564  
Old 24.02.2023, 17:58
pspzockerscene's Avatar
pspzockerscene pspzockerscene is online now
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,912
Default

A script for this is not needed!
Are you sure you really want this?
Do this on your own risk! JDownloader will request/every(!) URL that you copy/add!


It is also possible using a single LinkCrawler rule of type DEEPDECRYPT:
Code:
[
  {
    "enabled": true,
    "logging": false,
    "maxDecryptDepth": 1,
    "name": "Auto deepdecrypt everything",
    "pattern": ".*",
    "rule": "DEEPDECRYPT",
    "packageNamePattern": null,
    "passwordPattern": null,
    "deepPattern": null
  }
]
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?

Last edited by pspzockerscene; 24.02.2023 at 18:08. Reason: Fixed typo risk = CPU, risc = risc :D
Reply With Quote
  #2565  
Old 24.02.2023, 18:25
Alexpark24 Alexpark24 is offline
Junior Loader
 
Join Date: Jan 2023
Posts: 13
Default

Quote:
Originally Posted by pspzockerscene View Post
A script for this is not needed!
Are you sure you really want this?
Do this on your own risk! JDownloader will request/every(!) URL that you copy/add!


It is also possible using a single **External links are only visible to Support Staff**... of type DEEPDECRYPT:
Code:
[
  {
    "enabled": true,
    "logging": false,
    "maxDecryptDepth": 1,
    "name": "Auto deepdecrypt everything",
    "pattern": ".*",
    "rule": "DEEPDECRYPT",
    "packageNamePattern": null,
    "passwordPattern": null,
    "deepPattern": null
  }
]
huh, im ok with this, but trigger? what need? for work
Reply With Quote
  #2566  
Old 25.02.2023, 09:01
m_speed m_speed is offline
Modem User
 
Join Date: Jun 2022
Posts: 2
Default Short pause between downloads

Script for a short pause between downloads.

Problem; Issue with files downloading with the same created time.
Reply With Quote
  #2567  
Old 25.02.2023, 18:41
SMS SMS is offline
Mega Loader
 
Join Date: Jun 2019
Posts: 64
Default

I'm trying to use the filename that the webserver suggests (which probably happens via the Content-Disposition header). I try the following script (with "Packagizer Hook" trigger), but I get "null" in the responseHeader:
Code:
var myBrowser = getBrowser();
var responseHeader = myBrowser.getResponseHeader(link.getURL());
How do I access the headers, or the filename that the webserver suggests, for further processing in the script?

Last edited by SMS; 25.02.2023 at 18:46.
Reply With Quote
  #2568  
Old 26.02.2023, 03:46
fuknuckle fuknuckle is offline
Black Hole
 
Join Date: Aug 2015
Posts: 253
Default

Quote:
Originally Posted by mgpai View Post
Since the passwords can contain ":" as well as "@" character, the script uses "\t" as separator. No need to use the actual "\t" escape code to separate the values in the text file. Just use 'tab' key on keyboard.

Code:
/*
    Import accounts from text/csv file
    Login details should be in hoster\tusername\tpassword (tsv format), 1 per line
    Set path to text file and click 'test run' button to import the accounts
*/

var myfile = "c:/downloads/accounts.txt";

try {
    readFile(myfile).trim().split("\r\n").forEach(function(item) {
        callAPI("accounts", "addAccount", item.split("\t"));
    });
} catch (e) {
    alert(e.message);
};

So the script isn't working/doing anything. I put all the accounts in a text file with each account and password as well as the hoster on a separate line and the script does noting, tells me nothing and I tried it on a text file with a single account and it didn't import it.

this is how they are formatted according to your instructions

mega.nz ********@******************.com ***************



I copied your code exactly the only thing I changed was the path to the text file. other than that, I don't know what I could be doing wrong.

could you please help?
Attached Images
File Type: png mega.png (71.2 KB, 5 views)
Reply With Quote
  #2569  
Old 27.02.2023, 22:01
Neonlinx Neonlinx is offline
Modem User
 
Join Date: Feb 2023
Posts: 2
Default

Hi,

don't know if this is the right place for this request....if not please forgive me.

Sometimes there are many .rev files in a package. It would be great if it were possible to move the .rev files into another package (perhaps with the same name as the original package plus the word 'REV') and starting them as 'disabled'.

This way you can decide to download the .rev files at the end, only if necessary.

Hope that someone could help...thanks anyway!
Reply With Quote
  #2570  
Old 28.02.2023, 12:02
pspzockerscene's Avatar
pspzockerscene pspzockerscene is online now
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,912
Default

A Packagizer rule could already be enough to do that.
Conditions would be something like "if filename contains .rev" -> Set packagename -> "REV-Package".
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #2571  
Old 28.02.2023, 12:31
golddust golddust is offline
Modem User
 
Join Date: Feb 2023
Posts: 2
Default

Quote:
Originally Posted by golddust View Post
Hello,

I would like to request a script where JDownloader would automatically skip the download of the same matching filename with a different extension.

Example -

If I have Apple.zip in my directory, and if JDownloader is about to download Apple.7z, it would skip the download.

It should work for any extension.

Thank you.
Hello, could any script expert help out on this request? Thank you!
Reply With Quote
  #2572  
Old 01.03.2023, 16:21
ba.90 ba.90 is offline
Modem User
 
Join Date: Jan 2021
Posts: 1
Default

Hello,

i want JDownloader to call a Filbot-Node Task / Script over the Event scripter.
The only way I found to do this, is over the “eventTrigger : ON_ARCHIVE_EXTRACTED” option. This in principle works, but unfortunately it calls the Filebot-Node Task / Script obviously after each extraction.

Is there an easy way to call a Filbot-Node Task / Script only once, when all downloads in JDownloader are finished extracted?

Thanks in advance!

(I’m running JDownloader headless on a Synology NAS)
Reply With Quote
  #2573  
Old 01.03.2023, 16:56
perspicacia perspicacia is offline
JD Beta
 
Join Date: Nov 2015
Posts: 57
Default

Quote:
Originally Posted by mgpai View Post
This script will replace the characters just before they are added to linkgrabber list. If you want to replace them after they are added to JD, you will have to use a different script with context-menu button pressed trigger.

Code:
/*
    Replace space with underscore in filenames
    Trigger : Packagizer Hook
*/

try {
    if (state == "BEFORE") {
        link.setName(link.name.replace(/\s/g, "_"));
    }
} catch (e) {};
How do I adapt this to change all underscores "_" to "." in a filename

Thanks no need to answer this now as I have worked out for myself

Last edited by perspicacia; 05.03.2023 at 00:59. Reason: Worked out the solution myself
Reply With Quote
  #2574  
Old 03.03.2023, 21:47
Neonlinx Neonlinx is offline
Modem User
 
Join Date: Feb 2023
Posts: 2
Default

Quote:
Originally Posted by pspzockerscene View Post
A **External links are only visible to Support Staff**... could already be enough to do that.
Conditions would be something like "if filename contains .rev" -> Set packagename -> "REV-Package".

Oh...I'm really stupid! You're right!

Thanks for help!....anyway, I'm still missing one thing: I just want all the .rev files in one (new) folder;
Reply With Quote
  #2575  
Old 09.03.2023, 21:08
Skeeve Skeeve is offline
JD Adviser
 
Join Date: Feb 2010
Posts: 106
Default

This is my "Package Finished" script.

It will run when I downloaded a YT Video to a specific directory.

The downloaded video will then be moved to a remote host by calling a shell script.

Should the moving fail, and so the video still be there, I pop up an alert and want to set the comment accordingly.

Unfortunately neither setting the comment on the package nor on the link does have any effect.

Can someone please guide me here?

Code:
// move YT Video to target
// Trigger Required: "Package Finished"
// Forum Post used as basis: https://board.jdownloader.org/showpost.php?p=386822&postcount=18
package.setComment("copying...");
var links = package.getDownloadLinks();
var failure = 0;
for (i = 0; i < links.length; i++) {
    var link = links[i];
    var file = link.getDownloadPath();
    var pos = file.indexOf('/jdyt/'); 
    if (pos >= 0) {
        callSync('/Users/skeeve/bin/jdyt2target.bash', file.substr(0,pos+6), file.substr(pos+6));
        var myFilePath = getPath(file);
        if (myFilePath.exists()) {
            ++failure;
            alert(comment);
            var comment = "Couldn't copy " + file.substr(pos+6);
            link.setComment(comment);
            package.setComment(comment);
        } else {
            link.setComment("ok");
        }
    }
}
if (failure == 0) package.setComment("ok");

Last edited by Skeeve; 09.03.2023 at 21:12.
Reply With Quote
  #2576  
Old 14.03.2023, 16:30
pspzockerscene's Avatar
pspzockerscene pspzockerscene is online now
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,912
Default

Quote:
Originally Posted by Neonlinx View Post
Thanks for help!....anyway, I'm still missing one thing: I just want all the .rev files in one (new) folder;
So then simply use the "...then set" ... "Download Directory"...
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #2577  
Old 16.03.2023, 13:48
Sokub Sokub is offline
JD Adviser
 
Join Date: Feb 2018
Posts: 107
Default "Start Downloads"-Entry in Context-Menu

Hey there!

I am looking for a way to get the very ordinary "Start Downloads"-Entry into the Context-Menu.
Unfortunately I could not find it in the list of possible items to add. ... So I guess the only way would be an event-script.

Can someone help me with the code for this, please?
This would be very appreciated.
Reply With Quote
  #2578  
Old 17.03.2023, 19:46
Skeeve Skeeve is offline
JD Adviser
 
Join Date: Feb 2010
Posts: 106
Default

Quote:
Originally Posted by Sokub View Post
Hey there!

I am looking for a way to get the very ordinary "Start Downloads"-Entry into the Context-Menu.
Unfortunately I could not find it in the list of possible items to add. ... So I guess the only way would be an event-script.

Can someone help me with the code for this, please?
This would be very appreciated.
Maybe this helps? https://support.jdownloader.org/Know...jdownloader/21
Reply With Quote
  #2579  
Old 18.03.2023, 02:06
Sokub Sokub is offline
JD Adviser
 
Join Date: Feb 2018
Posts: 107
Default

Quote:
Originally Posted by Skeeve View Post
Maybe this helps? **External links are only visible to Support Staff**...
Thank you Skeeve, for your effort!

But I had done all those steps already. All I needed was the java command for starting the downloads. Because it is NOT in the list of possible items to add to the context menu. (To the toolbar yes, but not to the context menu).

But since this must be so ridiculously easy, your post gave me the idea to search this thread for "Start downloads" ... and indeed: The command popped up:
HTML Code:
startDownloads();
Ridiculously easy indeed! :-D

It's working now!
Thanks again!
Reply With Quote
  #2580  
Old 18.03.2023, 14:16
Sokub Sokub is offline
JD Adviser
 
Join Date: Feb 2018
Posts: 107
Default Add "Force Dowload"-Button to Toolbar

I would like to have the "Force Dowload"-function from the context menu as a toolbar button.

Can someone help me with the script code for this, please?
Reply With Quote
  #2581  
Old 23.03.2023, 09:24
Triptonite Triptonite is offline
Modem User
 
Join Date: Mar 2023
Posts: 3
Default Move files and folders after extraction

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);
})
Thank you very much!
Reply With Quote
  #2582  
Old 23.03.2023, 12:51
pspzockerscene's Avatar
pspzockerscene pspzockerscene is online now
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,912
Default

@Triptonite
Why don't you simply use a Packagizer rule for that?
See "... then do" ... "Move to"...
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #2583  
Old 23.03.2023, 13:01
Triptonite Triptonite is offline
Modem User
 
Join Date: Mar 2023
Posts: 3
Default

@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.
Reply With Quote
  #2584  
Old 23.03.2023, 13:26
pspzockerscene's Avatar
pspzockerscene pspzockerscene is online now
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,912
Default

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
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #2585  
Old 23.03.2023, 14:41
Triptonite Triptonite is offline
Modem User
 
Join Date: Mar 2023
Posts: 3
Default

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.
Reply With Quote
  #2586  
Old 23.03.2023, 14:44
pspzockerscene's Avatar
pspzockerscene pspzockerscene is online now
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,912
Default

Quote:
Originally Posted by Triptonite View Post
As far as I understand it, Packagizer is not designed to move folders, but only files.
That is correct.
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
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?

Last edited by pspzockerscene; 23.03.2023 at 14:48.
Reply With Quote
  #2587  
Old 23.03.2023, 20:22
itsVeto itsVeto is offline
Baby Loader
 
Join Date: Mar 2023
Posts: 5
Default

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);
}
Reply With Quote
  #2588  
Old 24.03.2023, 11:48
pspzockerscene's Avatar
pspzockerscene pspzockerscene is online now
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,912
Default

@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
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #2589  
Old 24.03.2023, 13:51
itsVeto itsVeto is offline
Baby Loader
 
Join Date: Mar 2023
Posts: 5
Default

Quote:
Originally Posted by pspzockerscene View Post
@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 **External links are only visible to Support Staff**... 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.
Danke erstmal für deine Antwort. Ich schreibe mal in deutsch weiter.

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.
Reply With Quote
  #2590  
Old 24.03.2023, 13:57
pspzockerscene's Avatar
pspzockerscene pspzockerscene is online now
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,912
Default

Quote:
Originally Posted by itsVeto View Post
Leider habe ich wohl einen Fehler. Kannst du mal drüber schauen?
Ich gebe hier keinen Support für EventScripter Scripte.
Bitte warte auf die Antwort von anderen Usern oder Teammitgliedern.

Quote:
Originally Posted by itsVeto View Post
Ich kann wohl keine screenshots teilen. Zumindest sehe ich diese selbst nicht.
Doch kannst du.
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
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #2591  
Old 24.03.2023, 17:23
itsVeto itsVeto is offline
Baby Loader
 
Join Date: Mar 2023
Posts: 5
Default

Quote:
Originally Posted by pspzockerscene View Post
Ich gebe hier keinen Support für EventScripter Scripte.
Bitte warte auf die Antwort von anderen Usern oder Teammitgliedern.


Doch kannst du.
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...").
Hey es ging nicht um das Event Script bei der letzen Nachricht, sondern um die Settings die ich im Packagizer
Reply With Quote
  #2592  
Old 24.03.2023, 17:29
pspzockerscene's Avatar
pspzockerscene pspzockerscene is online now
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,912
Default

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
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?

Last edited by pspzockerscene; 24.03.2023 at 17:30. Reason: Mehr Infos ergänzt
Reply With Quote
  #2593  
Old 24.03.2023, 18:37
itsVeto itsVeto is offline
Baby Loader
 
Join Date: Mar 2023
Posts: 5
Default

Quote:
Originally Posted by pspzockerscene View Post
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!)
Siehst du das bild von meinem vorherigen Post? Ich habe das eigentlich genau so erstellt..
Reply With Quote
  #2594  
Old 24.03.2023, 18:42
pspzockerscene's Avatar
pspzockerscene pspzockerscene is online now
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,912
Default

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
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?

Last edited by pspzockerscene; 24.03.2023 at 18:42. Reason: Tippfehler fixed
Reply With Quote
  #2595  
Old 24.03.2023, 18:57
itsVeto itsVeto is offline
Baby Loader
 
Join Date: Mar 2023
Posts: 5
Default

Quote:
Originally Posted by pspzockerscene View Post
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.
Dann sollte es daran liegen, dass ich sie umbennene.
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?
Reply With Quote
  #2596  
Old 24.03.2023, 19:04
pspzockerscene's Avatar
pspzockerscene pspzockerscene is online now
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,912
Default

Quote:
Originally Posted by itsVeto View Post
Dann sollte es daran liegen, dass ich sie umbennene.
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:
Originally Posted by itsVeto View Post
Hat man eine Möglichkeit die dlc Dateien vor dem hinzurügen zu benennen?
Ich kann nicht folgen.
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
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
  #2597  
Old 26.03.2023, 12:27
samoreye samoreye is offline
I will play nice!
 
Join Date: Oct 2022
Posts: 3
Default Script support

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.
Reply With Quote
  #2598  
Old 26.03.2023, 13:18
samoreye samoreye is offline
I will play nice!
 
Join Date: Oct 2022
Posts: 3
Default

Quote:
Originally Posted by mgpai View Post
Code:
/*
    Interval > Add urls
    Trigger : Interval (Recommended 3600000 or more)
*/

var file = "c:\\downloads\\urls.txt";// <- Set path to text file

try {
    var links = readFile(getPath(file));

    callAPI("linkgrabberv2", "addLinks", {
        links: links
    })
} catch (e) {};

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?
Reply With Quote
  #2599  
Old 26.03.2023, 19:00
notice notice is offline
JD Supporter
 
Join Date: Mar 2023
Posts: 505
Default

@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
Reply With Quote
  #2600  
Old 27.03.2023, 16:04
pspzockerscene's Avatar
pspzockerscene pspzockerscene is online now
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 70,912
Default

Merged EventScripter Threads.
__________________
JD Supporter, Plugin Dev. & Community Manager

Erste Schritte & Tutorials || JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 16:11.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.