JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #21  
Old 05.02.2020, 13:23
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 853
Default

Quote:
Originally Posted by Fetter Biff View Post
So one somehow has to add each single script to a new item in the event scripter, I assume. And to give the items a name and do anything else?
Yes, you need to add them separately in eventscripter (will result in 4 separate entries).

Configure:
  • Set script name can be any name (optional)
  • Select trigger specified in the script
  • Open editor by clicking 'edit' button
  • Paste script content
  • For context menu scripts, customize the context menu (can click large button on top in the script panel or customize the respective context menus in GUI) and add new menu item as specified in the script.
  • Save script
  • Enable script 'checkbox' in main panel.

Use:
  • An new button will be available in the download list/linkgrabber list which can be used to add links to history file (links will be deleted from list).
  • Duplicate files will be marked automatically (#duplicatelink will be added to the comment)
  • If the link exists in history file, it will be automatically skipped when download starts.

If you need any help setting it up, you can also find me in JD Chat:
Code:
kiwiirc.com/nextclient/irc.freenode.net/#jdownloader

Last edited by mgpai; 05.02.2020 at 19:17. Reason: Corrected the webchat link.
Reply With Quote
  #22  
Old 05.02.2020, 14:08
Fetter Biff Fetter Biff is offline
JD Legend
 
Join Date: Oct 2014
Posts: 945
Default

It looks like that now:



So there are to context menu items to be customized, if I see it right. By clicking the cross in the left bottom corner, I assume(?):


From

to


I assume, that is done wrongly. Do not know how to to it rightly.

I clicked "allow" here:


Quote:
Enable script 'checkbox' in main panel.
Where is that checkbox? Respectively the main panel?

The JD Chat, thank you, is it more useful than doing it here? Can images be used there?
Reply With Quote
  #23  
Old 05.02.2020, 14:30
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 853
Default

Quote:
Originally Posted by Fetter Biff View Post
Where is that checkbox? Respectively the main panel?
The checkboxes (first column) have been enabled. From the screenshot everything appears to be ok.

For security purposes, on first run, JD will request your permission to execute the script. You can safely click OK for own/known scripts.

You can also change button names (for e.g. use native language). Just make sure that you use the same names in script as well as context menu.

Can do the same with comment. It can be also used in the search bar to filter/view duplicate links.

Quote:
Originally Posted by Fetter Biff View Post
The JD Chat, thank you, is it more useful than doing it here? Can images be used there?
It is suitable for technical assistance, since you don't have to wait between replies. Sharing image/file links are also permitted.
Reply With Quote
  #24  
Old 05.02.2020, 14:47
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 853
Default

Quote:
Are ... names with extensions ... in a txt file ... usable for the new script?
Code:
// Skip download link, if filename exists in the user-spcified list
// To download the file (prevent skipping), remove "#duplicatefile" from comment
// Trigger required: A Download Started

var fileNamesList = "c:/myFolder/fileslist.txt"; // < Set path to text file which contain the file names. Use "\\" or "/" as path separators.
var dupeFilecheck = link.getProperty("dupeFileCheck");
var linkName = link.getName();
var comment = link.getComment() || "";
var skipLink = function() {
    link.setSkipped(true);
    alert("Download Skipped: File \"" + linkName + "\" is present in files list.");
}

if (dupeFilecheck) {
    if (comment.indexOf("#duplicatefile") > -1) skipLink();
} else {
    var fileNames = readFile(getPath(fileNamesList)).trim().split("\r\n");

    fileNames.some(function(fileName) {
        if (linkName == fileName.trim()) {
            var text = "#duplicatefile";
            comment = comment ? text + " " + comment : text;
            link.setComment(comment);
            skipLink();
            return true;
        }
    })

    link.setProperty("dupeFileCheck", true);
}

I've quoted parts of text from your email for reference, without your permission. Hope it's OK.

Last edited by mgpai; 10.02.2020 at 07:00. Reason: Modified script to remove leading and trailing spaces from 'fileName'
Reply With Quote
  #25  
Old 05.02.2020, 14:59
Fetter Biff Fetter Biff is offline
JD Legend
 
Join Date: Oct 2014
Posts: 945
Default

Yes, yes, of course.

So a new script for a new item in JD, many thanks!

So it looks like this now:
Reply With Quote
  #26  
Old 05.02.2020, 15:20
Fetter Biff Fetter Biff is offline
JD Legend
 
Join Date: Oct 2014
Posts: 945
Default

I have added the path to the txt file containing the downloaded files in the new script:
I:\jD-Downloads\dummies.txt

The files contained in the txt files look like this:

Last edited by Fetter Biff; 08.02.2020 at 09:10.
Reply With Quote
  #27  
Old 05.02.2020, 15:31
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 853
Default

Quote:
Originally Posted by Fetter Biff View Post
I have added the path to the txt file containing the downloaded files in the new script:
I:\jD-Downloads\dummies.txt
java.io.FileNotFoundException: I:jD-Downloadsdummies.txt (Das System kann die angegebene Datei nicht finden)

Slash character is missing from file path, since it was not escaped. Set it as specified in the script.

Code:
Set path to text file which contain the file names. Use "\\" or "/" as path separators.
Wrong:
Code:
"I:\jD-Downloads\dummies.txt"
Correct:
Code:
"I:\\jD-Downloads\\dummies.txt"
or
Code:
"I:/jD-Downloads/dummies.txt"
Reply With Quote
  #28  
Old 05.02.2020, 15:36
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 853
Default

I have made some modifications to the script in Post #24. Please replace your existing script with the new version.
Reply With Quote
  #29  
Old 05.02.2020, 15:39
pspzockerscene's Avatar
pspzockerscene pspzockerscene is online now
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 52,451
Default

Woow mgpai I'm impressed!

-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager
How to create a log || Wie man einen Log erstellt
Captcha FAQ EN || Captcha FAQ DE || Erste Schritte & Tutorials
JDownloader 2 Setup Download
-----=>Support Chat<=-----
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
That's true James
Quote:
Originally Posted by James
Die Leute verstehen einfach nicht dass nur weil man mit einer Waffe auch auf Menschen schießen kann dass ein Schützenver​ein kein Ort für Amoklaufide​en ist
Reply With Quote
  #30  
Old 05.02.2020, 15:55
Fetter Biff Fetter Biff is offline
JD Legend
 
Join Date: Oct 2014
Posts: 945
Default

Quote:
java.io.FileNotFoundException: I:jD-Downloadsdummies.txt (Das System kann die angegebene Datei nicht finden)
Sorry, already corrected.

Quote:
I have made some modifications to the script in Post #24. Please replace your existing script with the new version.
I had added it as a new one. But now there have to be 4 items in the event scripter in total for the none dups purposal, if I see it right. Not five:
Reply With Quote
  #31  
Old 05.02.2020, 16:42
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 853
Default

@psp: Happy to be of any help.

Quote:
Originally Posted by Fetter Biff View Post
But now there have to be 4 items in the event scripter in total for the none dups purposal, if I see it right. Not five:
I can see 5 scripts in your screenshot, which sounds about right. Four should be from Post #18 and one from Post #24. Hope I have understood your question correctly.
Reply With Quote
  #32  
Old 05.02.2020, 18:59
Fetter Biff Fetter Biff is offline
JD Legend
 
Join Date: Oct 2014
Posts: 945
Default

Quote:
Four should be from Post #18 and one from Post #24. Hope I have understood your question correctly.
Yes, 5 scripts all together I copied. And you did not change them anymore once they were posted.

It seems here is no conncetion: **External links are only visible to Support Staff****External links are only visible to Support Staff**

How do I have to add the "Move to history" button?
Reply With Quote
  #33  
Old 05.02.2020, 19:16
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 853
Default

Quote:
Originally Posted by Fetter Biff View Post
Yes, 5 scripts all together I copied. And you did not change them anymore once they were posted.
I have made some minor change in the script in Post #24. The one currently there is the latest version.

Quote:
How do I have to add the "Move to history" button?
Based on your screenshot, I think you have already added it. The "Move to history" command should be available in your context menu.

Quote:
It seems here is no conncetion:
Try this link:
Code:
kiwiirc.com/nextclient/irc.freenode.net/#jdownloader

OR

you can also install/enable/use the built-in chat extension in JD. It also connects to the same channel.

Feel free to join me in chat. I am currently online there.
Reply With Quote
  #34  
Old 06.02.2020, 12:18
pspzockerscene's Avatar
pspzockerscene pspzockerscene is online now
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 52,451
Default

Here is another way to get into the chat:
http://jdownloader.org/de/knowledge/chat

-psp-
__________________
JD Supporter, Plugin Dev. & Community Manager
How to create a log || Wie man einen Log erstellt
Captcha FAQ EN || Captcha FAQ DE || Erste Schritte & Tutorials
JDownloader 2 Setup Download
-----=>Support Chat<=-----
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
That's true James
Quote:
Originally Posted by James
Die Leute verstehen einfach nicht dass nur weil man mit einer Waffe auch auf Menschen schießen kann dass ein Schützenver​ein kein Ort für Amoklaufide​en ist
Reply With Quote
  #35  
Old 06.02.2020, 13:50
Fetter Biff Fetter Biff is offline
JD Legend
 
Join Date: Oct 2014
Posts: 945
Default

Vielen Dank, hat geklappt
Reply With Quote
  #36  
Old 07.02.2020, 20:09
Fetter Biff Fetter Biff is offline
JD Legend
 
Join Date: Oct 2014
Posts: 945
Default

How could I add links to the history in the download list window when they are not downloaded (completely) or links without beginning downloading them?
Reply With Quote
  #37  
Old 08.02.2020, 05:41
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 853
Default

Quote:
Originally Posted by Fetter Biff View Post
How could I add links to the history in the download list window when they are not downloaded (completely) or links without beginning downloading them?
Either wait for the download to finish, or if you do no intend to download the file, use "Mark as finished" context menu command (customize menu to add it) to abort/cancel the download and then add it to history.
Reply With Quote
  #38  
Old 08.02.2020, 09:08
Fetter Biff Fetter Biff is offline
JD Legend
 
Join Date: Oct 2014
Posts: 945
Default

Alright, thank you very much!
Reply With Quote
  #39  
Old 09.02.2020, 10:26
Fetter Biff Fetter Biff is offline
JD Legend
 
Join Date: Oct 2014
Posts: 945
Default

Is it possible to show only one message for all of the skipped downloads respectively to show the downloads in a single message or to have an option to not to show a skipped message at all?



JD gets the focus / comes on top each time a message is shown. So if there are many skipped downloads it is quite inconvenient to e.g. use another program. And to close the messages is a little inconvenient as well.

And each time JD is restarted with the same links in the download list the same messages for the same downloads occur again. Can one somehow avoid that?

Last edited by Fetter Biff; 09.02.2020 at 10:30.
Reply With Quote
  #40  
Old 09.02.2020, 10:58
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 853
Default

Quote:
Originally Posted by Fetter Biff View Post
Is it possible to show only one message for all of the skipped downloads respectively to show the downloads in a single message or to have an option to not to show a skipped message at all?
Dupe check is performed on single link, so the message will be displayed for each duplicate link detected.

You can delete the following line or comment it (Add "//" at the beginning of that line) out to prevent the message from being displayed:

Current:
Code:
alert("Download Skipped: \"" + url + "\" is present in history file.");
Commented out:
Code:
// alert("Download Skipped: \"" + url + "\" is present in history file.");

You can do it in both link check and file check scripts.

Quote:
Originally Posted by Fetter Biff View Post
And each time JD is restarted with the same links in the download list the same messages for the same downloads occur again. Can one somehow avoid that?
Once you comment out the message, JD will only skip it and not display any message. Skipping is required to prevent downloading the file again.

To avoid dupe checking everytime you start JD, remove the "#duplicatelink" or "#duplicatefile" from the comment (if you are plannig to redownload the file) or delete it from the list (if you don't intend to download it again).
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 18:36.
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 - 2020, Jelsoft Enterprises Ltd.