JDownloader Community - Appwork GmbH
 

Notices

Reply
 
Thread Tools Display Modes
  #361  
Old 02.03.2018, 11:40
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,343
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, 11: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, 12:11
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,343
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, 15: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, 15:59
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,343
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, 17:34
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
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, 17: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, 18:03
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
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, 18: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, 18:08
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
Default

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

@mgpai: Please note that getExtractedFiles returns string and getExtractedFilePaths returns an object
__________________
JD-Dev & Server-Admin
Reply With Quote
Old 04.03.2018, 18:13
patriks
Message deleted by Jiaz.
  #372  
Old 04.03.2018, 18: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, 13:16
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,343
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, 13:18
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,343
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, 03: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, 07:58
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,533
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, 10:07
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,343
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, 16: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, 17:00
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,343
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, 21: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
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 13:31.
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.