JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #361  
Old 02.03.2018, 10:40
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,478
Default

That should not be neccessary if you set the enable the flag on filesystem as it will be compressed automatically then. When you enable NTFS compression on that drive/folder? then it will happen always.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #362  
Old 02.03.2018, 10:47
dxzdxz1 dxzdxz1 is offline
Super Loader
 
Join Date: Nov 2017
Posts: 26
Default

Quote:
Originally Posted by Jiaz View Post
That should not be neccessary if you set the enable the flag on filesystem as it will be compressed automatically then. When you enable NTFS compression on that drive/folder? then it will happen always.
It's similar, but not the same. The level of compression that I want to apply (lzx) can only be set through this cmd.
Reply With Quote
  #363  
Old 02.03.2018, 11:11
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,478
Default

Ah okay. I suggest to contact mgpai, he is our eventscripter master and I'm sure he will be able to help you in no time
__________________
JD-Dev & Server-Admin
Reply With Quote
  #364  
Old 02.03.2018, 14:01
patriks's Avatar
patriks patriks is offline
Super Loader
 
Join Date: Aug 2017
Location: Brasil
Posts: 29
Default

Quote:
Originally Posted by Jiaz View Post
@patrik: what exactly doesnt work about *autoconfirm* ? You know about the timeout of it ? maybe auto confirm works but there is a confirmation dialog about offline/incomplete archives and without answering this dialog, nothing will happen.
You can check Settings-Advanced Settings-confirm
I have "autoconfirm" active, including in the script:

Code:
{
    callAPI("linkgrabberv2", "addLinks", {
        "autostart": true,
        "autoConfirm": true,
        "deepDecrypt": false,
        "links": readFile("_jd3-5m.txt")
    })
}


I have modified some settings to avoid these dialogs, I also deactivated Bubbles Notify.
There are offlines links in my scans, but even with filter, it stops sending the links to download. When this happens the white circle gets stopped at the end counting stage, but it does not add the links, and stays like this until the linkgrabber list is cleaned or I manually move to download.

The problem always happened, it could be with 1 day or more of 3, but eventually it happens. With the "clearList" I can leave the jdowloader for more than 15 days on, without interfering. But I would like a better solution than "clearList", is there another command I can use without losing the links in the list?
Reply With Quote
  #365  
Old 02.03.2018, 14:59
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,478
Default

LinkgrabberSettings.handleincompletearchiveonconfirmlatestselection is set to *Ask me*. So incomplete archives will show a dialog which then might time out and do nothing.
Don't get me wrong but instead of finding a workaround, we should find out why this happens and make it work as intended
__________________
JD-Dev & Server-Admin
Reply With Quote
  #366  
Old 02.03.2018, 16:34
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,545
Default

Quote:
Originally Posted by dxzdxz1 View Post
... after each download and extraction finishes I would like to run this command: compact.exe /c /exe:lzx * for every new downloaded file ...
Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/dxzdxz1.js
Reply With Quote
  #367  
Old 02.03.2018, 16:55
dxzdxz1 dxzdxz1 is offline
Super Loader
 
Join Date: Nov 2017
Posts: 26
Default

Quote:
Originally Posted by mgpai View Post
Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/dxzdxz1.js
Hi, just tested here and didn't work. I got the error: Cannot call method "forEach" of null (#1)
Reply With Quote
  #368  
Old 02.03.2018, 17:03
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,545
Default

Quote:
Originally Posted by dxzdxz1 View Post
Hi, just tested here and didn't work. I got the error: Cannot call method "forEach" of null (#1)
Try it on live data.
Reply With Quote
  #369  
Old 02.03.2018, 17:05
dxzdxz1 dxzdxz1 is offline
Super Loader
 
Join Date: Nov 2017
Posts: 26
Default

Quote:
Originally Posted by mgpai View Post
Try it on live data.
I just downloaded a zip file with 3 files inside, after the download finished I got this error
Reply With Quote
  #370  
Old 02.03.2018, 17:08
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,545
Default

Please contact me in JD Chat.
Reply With Quote
  #371  
Old 02.03.2018, 17:32
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,478
Default

@mgpai: Please note that getExtractedFiles returns string and getExtractedFilePaths returns an object
__________________
JD-Dev & Server-Admin
Reply With Quote
Old 04.03.2018, 17:13
patriks
Message deleted by Jiaz.
  #372  
Old 04.03.2018, 17:20
patriks's Avatar
patriks patriks is offline
Super Loader
 
Join Date: Aug 2017
Location: Brasil
Posts: 29
Default

Quote:
Originally Posted by Jiaz View Post
LinkgrabberSettings.handleincompletearchiveonconfirmlatestselection is set to *Ask me*. So incomplete archives will show a dialog which then might time out and do nothing.
Don't get me wrong but instead of finding a workaround, we should find out why this happens and make it work as intended
Hi Jiaz! Unfortunately it did not work, I made these modifications to my jdownloader instances on my remote computer: https://i.imgur.com/dZfiPOK.png
The "autoconfirm" stopped in both, there are no dialogues.


I downloaded the totally new jdownload.jar on my computer and made the following modifications:

1. instagram plugin: only grab the x lastest items? check
2. instsled event script and configure
interval 400000ms
Code:
{
    callAPI("linkgrabberv2", "addLinks", {
        "links": readFile("_jd3-6m.txt")
    })
}
and
interval 300000ms
Code:
{
    callAPI("linkgrabberv2", "addLinks", {
        "links": readFile("_jd3-5m.txt")
    })
}
3. general: if the file already existis: skip file
4. advanced settings: Default On Added Dupes Links Action: check
5. https://i.imgur.com/vZc0sqM.png
6. autoconfirm not working https://i.imgur.com/sTrHCMX.png

logs:
03.03.18 12.00.27 <--> 03.03.18 12.00.27 jdlog://4450554433151/
03.03.18 11.52.58 <--> 03.03.18 12.00.27 jdlog://5450554433151/

Here is jd that I downloaded for testing on my computer if you want to see something.
**External links are only visible to Support Staff****External links are only visible to Support Staff**

I have another problem, my two scripts run multiple times (on remote computer), even with the active script synchronization:
Is it possible to do something like a queue?
Reply With Quote
  #373  
Old 05.03.2018, 12:16
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,478
Default

Quote:
Originally Posted by patriks View Post
I have another problem, my two scripts run multiple times (on remote computer), even with the active script synchronization:
Is it possible to do something like a queue?

In script editor you can flag the script to run synchronously. There is a checkbox for it. That avoids multiple runs of the same script at the same time.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #374  
Old 05.03.2018, 12:18
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,478
Default

Can you please send the example links to support@jdownloader.org so I don't have to type manually from screenshot?
We can also take a look at this together via Teamviewer if you like, just contact us via support@jdownloader.org
__________________
JD-Dev & Server-Admin
Reply With Quote
  #375  
Old 13.03.2018, 02:10
patriks's Avatar
patriks patriks is offline
Super Loader
 
Join Date: Aug 2017
Location: Brasil
Posts: 29
Default

Hi everyone, I need some tips.
How can I change the date in a script to be shown like this: 20180312 21:00:00 or 2018-03-12 21h00m00s
Currently it shows like this: Mar 12 2018 21:00:00

script:

Code:
// Simple history
// Trigger Required : A Download Stopped
disablePermissionChecks();
if (link.isFinished()) {
    var a /*date*/ = new Date().toString().substring(4, 24);
    var b /*history folder*/ = JD_HOME + "/auto/";
    var c /*history file Name */ = "_h.txt";
    var d /*download url*/ = link.getContentURL();
    var e /*download file name*/ = link.getName();

    if (!getPath(b).exists()) getPath(b).mkdirs();
    writeFile(b + c, [a, d, e].join(",") + "\r\n", true);
}
Is it possible to export information like that from inside the downloadList#.zip? Like the "directurl"?

example of information that is inside the zip:

Code:
{
{
  "name" : "thegermanshepherdworld - BgGvcDjDy6-.jpg",
  "url" : "instagrammdecrypted://BgGvcDjDy6-",
  "properties" : {
    "date" : "2018-03-09",
    "LINKDUPEID" : "vp/c98b0152c7c486ad2232df05ff6b16c8/5B372366/t51.2885-15/e35/28436190_153362845355377_3820390520941707264_n.jpg",
    "directurl" : "**External links are only visible to Support Staff**,
    "shortcode" : "BgGvcDjDy6-",
    "COMMENT" : "CLICK the link in our bio @thegermanshepherdworld to shop designer GSD products \uD83D\uDED2\uD83D\uDC36\uD83C\uDF81\n\uD83D\uDC49Made in the USA\uD83C\uDDFA\uD83C\uDDF8\n\uD83D\uDC49International delivery\uD83D\uDCE6\uD83C\uDF0F\n.\n\uD83D\uDCF8 credit: @chaselovato\n.\nTag a friend who loves german shepherds❤\uD83D\uDC36\n.",
    "VERIFIEDFILESIZE" : 180651,
    "FINAL_FILENAME" : "thegermanshepherdworld - BgGvcDjDy6-.jpg",
    "URL_CONTENT" : "**External links are only visible to Support Staff**,
    "decypter_filename" : "thegermanshepherdworld - BgGvcDjDy6-.jpg",
    "PROPERTY_RESUMEABLE" : false,
    "URL_ORIGIN" : "**External links are only visible to Support Staff**,
    "FINISHTIME" : 1520902000818,
    "DOWNLOADTIME" : 10
  },
  "size" : 180651,
  "host" : "instagram.com",
  "created" : 1520901983913,
  "enabled" : true,
  "uid" : 1520901984557,
  "urlProtection" : "UNSET",
  "current" : 180651,
  "linkStatus" : null,
  "finalLinkState" : "FINISHED",
  "chunkProgress" : [ 180650 ],
  "availablestatus" : "TRUE",
  "propertiesString" : null
}
About my previous post, I sent all the links to the email, but I did not get a reply, anyway I was able to solve the problem using a "mgpai" script modified by me:

Code:
disablePermissionChecks();
if (readyForUpdate()) callAPI("linkgrabberv2", "clearList");

// Functions
function readyForUpdate() {
    if (interval < 60000) return;
    if (callAPI("linkcrawler", "isCrawling")) return;
    if (callAPI("linkgrabberv2", "isCollecting")) return;
    return true;
}
About "synchronization", it is active in all my scripts ("isSynchronous" : true), it still happens. is possible to reproduce the bug of same scripts running at the same time in the jdownloader that I sent to google drive.
Reply With Quote
  #376  
Old 13.03.2018, 06:58
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,545
Default

Quote:
Originally Posted by patriks View Post
... I would like a better solution than "clearList", is there another command I can use without losing the links in the list?
Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/patriks.js

Quote:
Originally Posted by patriks View Post
... How can I change the date in a script to be shown like this: 20180312 21:00:00 ...
Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/patriks_2.js

Quote:
Originally Posted by patriks View Post
... is possible to reproduce the bug of same scripts running at the same time in the jdownloader that I sent to google drive.
If you are using callAsync() methods in the script, try using callSync() instead.
Reply With Quote
  #377  
Old 13.03.2018, 09:07
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,478
Default

Quote:
Originally Posted by patriks View Post
Is it possible to export information like that from inside the downloadList#.zip? Like the "directurl"?
You can use DownloadLinkSandbox.getProperty(key), for example getProperty("directurl")
__________________
JD-Dev & Server-Admin
Reply With Quote
  #378  
Old 13.03.2018, 15:27
patriks's Avatar
patriks patriks is offline
Super Loader
 
Join Date: Aug 2017
Location: Brasil
Posts: 29
Default

mgpai/Jiaz thank you very much, the script was perfect

for anyone who wants to use:
Code:
// Simple history
// Trigger Required : A Download Stopped
disablePermissionChecks();

// Function
function now() {
    var d = new Date();
    var t = d.toString().split(" ");
    return t[3] + ('0' + (d.getMonth() + 1)).slice(-2) + t[2] + " " + t[4];
}

if (link.isFinished()) {
    var a /*date*/ = now();
    var b /*history folder*/ = JD_HOME + "/auto/";
    var c /*file Name */ = "_history.txt";
    var d /*download url*/ = link.getContentURL();
    var e /*download file name*/ = link.getName();
    var ig /*instagram directurl*/ = link.getProperty("directurl");
    var g /*other directurl*/ = link.getProperty("url");
    var vk /*vkontakte directurl*/ = link.getProperty("picturedirectlink");

    if (!getPath(b).exists()) getPath(b).mkdirs();
    writeFile(b + c, [a, vk, ig, g, d, e].join(",") + "\r\n", true);
}
original:
Quote:
Originally Posted by mgpai View Post
Simple history of downloaded links in text format.
  • Default folder: "<jdownloader>\auto\history" (e.g "c:\jdownloader\auto\history")
  • Default file name: "<current date>.txt" (e.g. "Oct 07 2016.txt")
Code:
// Simple history
// Trigger Required : A Download Stopped

if (link.isFinished()) {
    var a /*date*/ = new Date().toString().substring(4, 16);
    var b /*history folder*/ = JD_HOME + "/auto/history/";
    var c /*history file Name */ = a + ".txt";
    var d /*download url*/ = link.getContentURL();
    var e /*download file name*/ = link.getName();

    if (!getPath(b).exists()) getPath(b).mkdirs();
    writeFile(b + c, [d, e].join(",") + "\r\n", true);
}
~~~~~~
Quote:
Originally Posted by mgpai View Post
Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/patriks.js



Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/patriks_2.js



If you are using callAsync() methods in the script, try using callSync() instead.

mgpai is it possible to make the script ignore and delete the duplicate links?
the script does not understand a adv settings for dupes "do NOT add, but remove them from linkgrabber"

About sync:


I was able to reproduce this using two simple scripts:

synchronous execution of script: ok
interval: 40000
Code:
disablePermissionChecks();
callAPI("linkgrabberv2", "addLinks", {
    "autostart": true,
    "autoConfirm": true,
    "deepDecrypt": false,
    "links": "**External links are only visible to Support Staff**
})
synchronous execution of script: ok
interval: 30000
Code:
disablePermissionChecks();
callAPI("linkgrabberv2", "addLinks", {
    "autostart": true,
    "autoConfirm": true,
    "deepDecrypt": false,
    "links": "**External links are only visible to Support Staff**
})
~~~~~~
cfg/org.jdownloader.extensions.eventscripter.EventScripterExtension.scripts.json
Code:
[ {
  "eventTrigger" : "INTERVAL",
  "enabled" : true,
  "name" : "tst240s",
  "script" : "disablePermissionChecks();\ncallAPI(\"linkgrabberv2\", \"addLinks\", {\n    \"autostart\": true,\n    \"autoConfirm\": true,\n    \"deepDecrypt\": false,\n    \"links\": \"**External links are only visible to Support Staff**\n})",
  "eventTriggerSettings" : {
    "lastFire" : 1520950333534,
    "interval" : 40000,
    "isSynchronous" : true
  },
  "id" : 1520949865121
}, {
  "eventTrigger" : "INTERVAL",
  "enabled" : true,
  "name" : "tst130s",
  "script" : "disablePermissionChecks();\ncallAPI(\"linkgrabberv2\", \"addLinks\", {\n    \"autostart\": true,\n    \"autoConfirm\": true,\n    \"deepDecrypt\": false,\n    \"links\": \"**External links are only visible to Support Staff**\n})",
  "eventTriggerSettings" : {
    "lastFire" : 1520950364036,
    "interval" : 30000,
    "isSynchronous" : true
  },
  "id" : 1520949856117
} ]
Reply With Quote
  #379  
Old 13.03.2018, 16:00
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,478
Default

Quote:
Originally Posted by patriks View Post
mgpai is it possible to make the script ignore and delete the duplicate links?
the script does not understand a adv settings for dupes "do NOT add, but remove them from linkgrabber"[/CODE]
This has nothing to do with script. duplicate handling is global and independent how you've added the links. First you should check if duplicate detection works, the links should be highlighted in different color.
Also check Settings-Advanced Settings-LinkgrabberSettings.handledupesonconfirmlatestselection
and
LinkgrabberSettings.defaultonaddeddupeslinksaction
__________________
JD-Dev & Server-Admin
Reply With Quote
  #380  
Old 13.03.2018, 20:09
patriks's Avatar
patriks patriks is offline
Super Loader
 
Join Date: Aug 2017
Location: Brasil
Posts: 29
Default

Quote:
Originally Posted by mgpai View Post
Export download URLs (Linkgrabber List)

Export Download URLs (Download List)
  • Default folder: "<jdownloader>\auto\history" (e.g "c:\jdownloader\auto\export")
  • Default file name: "<timestamp> - DL Selection.txt" (e.g. "Nov 25 2016 17.26.44 - DL Selection.txt")
Code:
// Export download URLs
// Trigger : "DownloadList Contextmenu Button Pressed"

if (name == "Export URLs") {
    var exportFolder = JD_HOME + "/auto/export/"; // <- Folder for exporting the text files
    var now = new Date().toString().substring(4, 24).replace(/:/g, "."); // <- Timestamp used in file name
    var exportFile = now + " - DL Selection.txt"; // <- Filename for exporting the URLs
    var links = dlSelection.getDownloadLinks();
    var urls = [];

    for (i = 0; i < links.length; i++) {
        var link = links[i];
        var fileName = link.getName();
        var downloadURL = link.getContentURL();
        urls.push(downloadURL + "," + fileName);
    }

    if (!getPath(exportFolder).exists()) getPath(exportFolder).mkdirs();
    writeFile(exportFolder + exportFile, urls.join("\r\n"), true);
}
mgpai, I'm testing this script, but not work, no error message. Did I do something wrong?


I tested the linkgrabber version too, and it did not work.
Reply With Quote
  #381  
Old 13.03.2018, 20:10
patriks's Avatar
patriks patriks is offline
Super Loader
 
Join Date: Aug 2017
Location: Brasil
Posts: 29
Default

Quote:
Originally Posted by Jiaz View Post
This has nothing to do with script. duplicate handling is global and independent how you've added the links. First you should check if duplicate detection works, the links should be highlighted in different color.
Also check Settings-Advanced Settings-LinkgrabberSettings.handledupesonconfirmlatestselection
and
LinkgrabberSettings.defaultonaddeddupeslinksaction
Jiaz, all options to prevent dupes are active
Jd does not create duplicates when I add manually or by "autoconfirm", this only happens with the "moveToDownloadlist" script.


@edit
The Scheduler plugin with "Add All Downloads" action also adds duplicates in Downloads.

Last edited by patriks; 13.03.2018 at 20:14.
Reply With Quote
  #382  
Old 13.03.2018, 20:34
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,478
Default

The API method *moveToDownloadlist* does exactly what it states, move the given links/packages to downloadlist. There is no dupe handling at all for this. Same for Scheduler. It adds them all.
DupeSettings are for manual/auto confirm adding

I can add a new api method so you can check for dupes and remove them first.
I will add it tomorrow morning
__________________
JD-Dev & Server-Admin

Last edited by Jiaz; 13.03.2018 at 20:37.
Reply With Quote
  #383  
Old 14.03.2018, 09:32
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,478
Default

Thanks to mgpai!
You can use following method after next core update to remove dups
callAPI("linkgrabberv2", "cleanup", [], [], "DELETE_DUPE", "REMOVE_LINKS_ONLY", "ALL");
__________________
JD-Dev & Server-Admin
Reply With Quote
  #384  
Old 14.03.2018, 10:11
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,545
Default

Quote:
Originally Posted by patriks View Post
... is it possible to make the script ignore and delete the duplicate links?
Script Updated:
Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/patriks.js

Quote:
Originally Posted by patriks View Post
I'm testing this script, but not work, no error message. Did I do something wrong?
Have you renamed "EventScripter Trigger" to "Export URLs"? The button name in context menu should be the same as the one used in script.
Reply With Quote
  #385  
Old 14.03.2018, 21:19
patriks's Avatar
patriks patriks is offline
Super Loader
 
Join Date: Aug 2017
Location: Brasil
Posts: 29
Default

Quote:
Originally Posted by mgpai View Post
Script Updated:
Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/patriks.js
mgpai/Jiaz thank you very much for help me with the scripts.
This script is exactly what I wanted, but when there are no links in linkgrabber it gives an error in this line:

Code:
// Move all links to download list
// Related Post: https://board.jdownloader.org/showpost.php?p=419538&postcount=364

moveAllToDownloadList();

// Function
function moveAllToDownloadList() {
    callAPI("linkgrabberv2", "cleanup", [], [], "DELETE_DUPE", "REMOVE_LINKS_ONLY", "ALL");
    getAllCrawledPackages().forEach(function(package) {
        callAPI("linkgrabberv2", "moveToDownloadlist", [], [package.getUUID()]);
    });
}
Code:
Caused by: org.appwork.remoteapi.exceptions.BadParameterException: BAD_PARAMETERS(ERROR_BAD_REQUEST)
	at org.jdownloader.api.utils.PackageControllerUtils.cleanup(PackageControllerUtils.java:391)
	at org.jdownloader.api.linkcollector.v2.LinkCollectorAPIImplV2.cleanup(LinkCollectorAPIImplV2.java:729)
I want to run this script with interval(30s). How to make it ignore the error message?

Quote:
Originally Posted by mgpai View Post
Have you renamed "EventScripter Trigger" to "Export URLs"? The button name in context menu should be the same as the one used in script.
Now it works, thank you.
Reply With Quote
  #386  
Old 15.03.2018, 09:24
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,545
Default

Quote:
Originally Posted by patriks View Post
... when there are no links in linkgrabber it gives an error ... How to make it ignore the error message?
Script Updated:
Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/patriks.js

Last edited by mgpai; 15.03.2018 at 11:20. Reason: Redundant
Reply With Quote
  #387  
Old 15.03.2018, 10:56
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,478
Default

@patriks: will be fixed with next update
__________________
JD-Dev & Server-Admin
Reply With Quote
  #388  
Old 16.03.2018, 22:50
patriks's Avatar
patriks patriks is offline
Super Loader
 
Join Date: Aug 2017
Location: Brasil
Posts: 29
Default

My remote jdownloader is working perfectly for more than a day oppened, thanks a lot Jiaz and mgpai for the help with the scripts and updates.

final result:

Spoiler:
1. grab all links as listed in the .txt
https://board.jdownloader.org/showpo...64&postcount=9
Code:
disablePermissionChecks(); {
    callAPI("linkgrabberv2", "addLinks", {
        "autostart": true,
        "autoConfirm": true,
        "deepDecrypt": false,
        "links": readFile("_jd3b.txt")
    })
}

2. Move all links to download list, except duplicates.
https://board.jdownloader.org/showpo...&postcount=376
Code:
// Move all links to download list
disablePermissionChecks();
moveAllToDownloadList();

// Function
function moveAllToDownloadList() {
    callAPI("linkgrabberv2", "cleanup", [], [], "DELETE_DUPE", "REMOVE_LINKS_ONLY", "ALL");
    getAllCrawledPackages().forEach(function(package) {
        callAPI("linkgrabberv2", "moveToDownloadlist", [], [package.getUUID()]);
    });
}

3. "download history" with instagram/vkontakte direct url
https://board.jdownloader.org/showpo...&postcount=232
Code:
// Save Link URLs
// Files will be created in default (Global) download folder
// Trigger Required: A Download Stopped
disablePermissionChecks();

// Function
function now() {
    var d = new Date();
    var t = d.toString().split(" ");
    return t[3] + ('0' + (d.getMonth() + 1)).slice(-2) + t[2] + " " + t[4];
}

if (link.isFinished()) {
    var data = "<details open><summary>" + link.getName() + "</summary><table>";

    var urls = {
        "Content": link.getContentURL(),
        "Container": link.getContainerURL(),
        "Origin": link.getOriginURL(),
        "Referrer": link.getReferrerURL(),
        "Date": now(),
        "instagram": link.getProperty("directurl"),
        "other": link.getProperty("url"),
        "vkontakte": link.getProperty("picturedirectlink"),
    };

    for (x in urls) {
        if (urls[x]) data += "<tr><td>" + x + "</td><td> : <a href=\"" + urls[x] + "\">" + urls[x] + "</a></td></tr>";
    }

    data += "</table></details>";


    var b /*history folder*/ = JD_HOME + "/";
    var c /*file Name */ = "_history.htm";


    writeFile(b + c, data, true);
}
Reply With Quote
  #389  
Old 23.03.2018, 05:31
Peteisanidiot
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by Wicküler View Post
Don't know if this should be posted since it's so simple, but I wanted a way of getting notifications on my phone via pushover when a package had finished. It was quite easy and using the code
Code:
postPage("**External links are only visible to Support Staff**,
"token=appToken&user=userKey&message="
+ package.getName() +
" finished.");
with the Trigger "Package finished" is all that was needed. The userKey is located in your pushover-profile-page and the appToken can be generated there as well via "Create an API token" (somewhere near the bottom under "Your applications").

Works like a charm but if this thread is meant for more elaborate scripts, feel free to move or delete this post. Since I didn't find any other hints or tutorials for using pushover for jdownloader-notifications, I thought I'd just leave it here.
i know that this post is a bit old but i cannot get this script to work. any tips?
Reply With Quote
  #390  
Old 23.03.2018, 08:48
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,478
Default

@Peteisanidiot: What problem do you have? What doesn't work? Any error message or what exactly?
__________________
JD-Dev & Server-Admin
Reply With Quote
  #391  
Old 23.03.2018, 12:54
Peteisanidiot
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by Jiaz View Post
@Peteisanidiot: What problem do you have? What doesn't work? Any error message or what exactly?
I made some progress but can’t get the actual file name to be reflected in the notification - all messages just say “various files have finished.”
Reply With Quote
  #392  
Old 23.03.2018, 13:02
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,478
Default

package.getName will return the package name. You can use same call for download finished event and use link.getName()
__________________
JD-Dev & Server-Admin
Reply With Quote
  #393  
Old 23.03.2018, 14:56
Peteisanidiot
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by Jiaz View Post
package.getName will return the package name. You can use same call for download finished event and use link.getName()
Perfect! Thanks much.
Reply With Quote
  #394  
Old 23.03.2018, 15:07
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,478
Default

You're welcome Glad that you finally got it working
__________________
JD-Dev & Server-Admin
Reply With Quote
  #395  
Old 26.03.2018, 20:12
dariusmk dariusmk is offline
JD Fan
 
Join Date: Aug 2011
Posts: 79
Default

Hi,

Is there a script available that prevents jdownloader from unzipping / unraring downloaded files until all downloads in the download list are completed?

Regards,
dariusmk
Reply With Quote
  #396  
Old 27.03.2018, 08:52
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,545
Default

@dariusmk: Post #349
Reply With Quote
  #397  
Old 27.03.2018, 15:26
dariusmk dariusmk is offline
JD Fan
 
Join Date: Aug 2011
Posts: 79
Default

Quote:
Originally Posted by mgpai View Post
@dariusmk: **External links are only visible to Support Staff**...
Thanks for the quick reply!
Reply With Quote
  #398  
Old 30.03.2018, 16:12
Biohazmatz
Guest
 
Posts: n/a
Default

Hi guys,

I am looking for a script that does the following.

Situation:

Package1
- file1.part01.rar
- file1.part02.rar
- file1.part03.rar
...
- file2.part01.rar
- file2.part02.rar
- file2.part03.rar
...

1. When all parts of file1 are downloaded and the archive extraction has started, I want the downloading to be paused/stopped.
2. When the file has been successfully extracted, wait 1 minute
3. Start the download again

- Repeat for all extraction events
(Step 2 is optional)

Any help would be appreciated!
Reply With Quote
  #399  
Old 30.03.2018, 17:22
dariusmk dariusmk is offline
JD Fan
 
Join Date: Aug 2011
Posts: 79
Default

Quote:
Originally Posted by mgpai View Post
To extract archives only after all downloads have finished, use this new script:
Code:
github.com/mgpai/resources/blob/master/jdownloader/eventscripter/scripts/Taobaibai_2.js
@mgpai: What is the correct trigger for the script? "ON_DOWNLOAD_CONTROLLER_STOPPED"?

Thank you.
Reply With Quote
  #400  
Old 30.03.2018, 18:32
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,545
Default

Trigger specified in the script is "ON_PACKAGE_FINISHED", but will also work fine with "ON_DOWNLOAD_CONTROLLER_STOPPED". If you manually start/stop the downloads often, use the former.

Also, the script currently checks the status of individual downloads. It can be modified to check just the status of packages instead.
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 17:23.
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.