JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1281  
Old 21.03.2020, 16:48
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,553
Default

Quote:
Originally Posted by Heinz View Post
Is there any timeout possible for the getPage request?
Like if the page is not loaded after 10sec it should skip the request.
Connect/read timeout appears to be working fine. Had you tried this way?

Code:
var br = getBrowser();
br.setConnectTimeout(100);
br.setReadTimeout(100);
var page = null;

try {
    page = br.getPage("http://www.google.de/");
} catch (e) {}

alert(page);

In the above example, you can see that iIf you use a very low timeout, it will return 'null'.
Reply With Quote
  #1282  
Old 21.03.2020, 17:18
Heinz Heinz is offline
JD Alpha
 
Join Date: Feb 2020
Posts: 21
Default

Quote:
Originally Posted by mgpai View Post
Connect/read timeout appears to be working fine. Had you tried this way?
...
Thanks for the reply!

If i set timeout to 10 i also get a null return. But the general timeout is not working as expected.

If i measure the loadTime it can get higher than the timeout.

e.g. loadTime = 156ms when timeout was set to 50.
If a proxy is enabled loadTime can get really high.
So the timeout is not working unfortunately.


Code:
    
    var br = getBrowser();
    br.setConnectTimeout(50);
    br.setReadTimeout(50);
    //br.setProxy(...);
    var page = null;

    try {
        var startTime = new Date();
        page = br.getPage("http://www.google.de/");
        var endTime = new Date();
        var loadTime = endTime - startTime;
    } catch (e) {}

    alert(loadTime + " " + page);
Is this a bug? Do you know anything elese i could try?
Reply With Quote
  #1283  
Old 21.03.2020, 18:25
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,553
Default

Quote:
Originally Posted by Heinz View Post
If a proxy is enabled loadTime can get really high.
So the timeout is not working unfortunately.
This could be a bug. Even in GUI, when a download which is using a proxy connection is seemingly stuck, the user will not be able to stop/reset/disable the download in order to terminate the connection. Even the stop button will be grayed out. The connection can then be terminated only by restarting JD or by using a 3rd party utility.

When checking the browsr methods, I also came across a method which returns the total connection time (var myLong = myBrowser.getRequestTime()). This might return the load time more accurately.

Have you considered using an external tool to test the proxies? You can schedule them to be checked at regular intervals and then add/remove them from JD using MYJD API.
Reply With Quote
  #1284  
Old 21.03.2020, 19:19
Heinz Heinz is offline
JD Alpha
 
Join Date: Feb 2020
Posts: 21
Default

Quote:
Originally Posted by mgpai View Post
Have you considered using an external tool to test the proxies? You can schedule them to be checked at regular intervals and then add/remove them from JD using MYJD API.
External is no option for me.

Can the bug get fixed, what can we do to get it fixed?
Reply With Quote
  #1285  
Old 21.03.2020, 23:18
BJN01 BJN01 is offline
JD Adviser
 
Join Date: Jan 2020
Posts: 113
Default

Quote:
Originally Posted by mgpai View Post
Code:
var stdOut = callSync("cmd", "/c", "dir/b", "\\");
var array = stdOut.split("\r\n"); // Splitting string by lines vill result in an array
var X = array[0];
var Y = array[1];

alert("X : " + X + "\r\nY : " + Y);

thank you very much again

I was able to read the <stdout stream> [au3 ---> JD2] but now I'm trying to do the opposite and I'm having some problems.

From what I understand in au3 I use "StdoutRead" but I have 2 doubts:

1) - (au3) i need "process_id" and i can't understand how to spot it.
I should "run" the JD script ... but the JD script has launched the au3 script ....
2) - in event scripter ... there is an equivalent to ConsoleWrite ?


In short, in the JD script I would like to write a constant to be read by au3 which will be called by the aforementioned script. is such a thing feasible?

(jd script schematized)
Code:
*** var / func/ etc ***
 var K = " test or something"
  *----> {stdout stream ("K")}
 { holaa = callSync( test.au3 ) <---- read the stdout  for grab "K"  

alert ( holaa) <---- I see the final result / continue with the result of au3
*** etc ***
Reply With Quote
  #1286  
Old 22.03.2020, 00:57
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,614
Default

Quote:
Originally Posted by Heinz View Post
Is there any timeout possible for the getPage request?
Like if the page is not loaded after 10sec it should skip the request.

Code:
browser.setConnectTimeout(10000);
browser.setReadTimeout(10000);
Dont seem to help..

Code:
var browser = getBrowser();
try {
	browser.getPage("http://www.google.de/", 10000);
} catch (e) {                         
}
How could this be achieved? possible in any way?

myBrowser.setConnectTimeout(myInt);
myBrowser.setReadTimeout(myInt);
which you have mentioned

timeout value within getpage is not supported.
but try and catch should work.

..

in respects to mpgai response the method myBrowser.getRequestTime might be a better solution.
Keep in mind Javascript support in JD can contain commands that are wrapped back into JD methods, the Javascript interface is sandboxed.

Timeouts have always been an issue specially to laggy connections within JD Browser. The interface between sockets and GUI has been a problem as it waits for all connections to close before coming responsive again. Large timeout timeframes are not recommended from personal experience, it just makes situation worse. If a connection can't be used in standard times, you're better off not using it.
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]

Last edited by raztoki; 22.03.2020 at 01:07.
Reply With Quote
  #1287  
Old 22.03.2020, 05:45
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,553
Default

Quote:
Originally Posted by Heinz View Post
Can the bug get fixed, what can we do to get it fixed?
While the issue has been reported by many users, none of them were able to provide information on how to reproduce it. If you find any way to do that, you can share it in one of the existing topics or create a new one.
Reply With Quote
  #1288  
Old 22.03.2020, 05:52
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,553
Default

Quote:
Originally Posted by BJN01 View Post
1) - (au3) i need "process_id" and i can't understand how to spot it.
JD stores the PID in 'JDownloader.pid' file in the 'home' folder.

Quote:
I should "run" the JD script ... but the JD script has launched the au3 script ....
2) - in event scripter ... there is an equivalent to ConsoleWrite ?

In short, in the JD script I would like to write a constant to be read by au3 which will be called by the aforementioned script. is such a thing feasible?
Pass the "PID" to the external program as parameter.

Code:
//Example 1
var pid = readFile(JD_HOME + "/jdownloader.pid").trim();
var stdOut = callSync("cmd", "/c", "echo", pid); // Pass the PID to cmd/echo as parameter
var K = stdOut.trim().length;
alert(K);

//Example 2
var pid = readFile(JD_HOME + "/jdownloader.pid").trim();
var stdOut = callSync(ahk, test.au3, pid); // Pass the PID to test.au3 as parameter
var K = stdOut;
alert(K);
Reply With Quote
  #1289  
Old 22.03.2020, 13:29
BJN01 BJN01 is offline
JD Adviser
 
Join Date: Jan 2020
Posts: 113
Default

Thanks mgpai for the reply , but I still have some problems on the "reception" side:

If I wanted to send a "data" to use as parameter I would have to do something like this (right ?)
Code:
var $SHText = " insert here sometjing ... please ";
var stdOut = callSync(ahk, test.au3t, $SHText);
so in au3 I should use <ConsoleRead ($SHText)> but I get "error $ SHText undeclared "
I think maybe I need something like <Local $SHText = Run ....?? >
but I can't understand how to solve, what should I write in au3 then?
(in the example of the au3 guide they pull the PID into play ... but I have not been able to understand how to use it correctly.)
Reply With Quote
  #1290  
Old 22.03.2020, 13:49
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,553
Default

Quote:
Originally Posted by BJN01 View Post
If I wanted to send a "data" to use as parameter I would have to do something like this (right ?)
What is the origin/source of $SHText value? Use an alert box to check if that value can be accessed by the script.

Code:
var $SHText = " insert here sometjing ... please ";
alert($SHText);

You can then pass it to the AHK script by using something similar to the example in post #1243.
Reply With Quote
  #1291  
Old 22.03.2020, 16:25
BJN01 BJN01 is offline
JD Adviser
 
Join Date: Jan 2020
Posts: 113
Default

the origin/source of $SHText value is a costant (a text in this example)
which I declare in the JD script but which should be used in au3
[ it is practically a variable of my au3 but I would like to express it in the JD script , the purpose is to modify only the jd script keeping au3 unchanged ]


I had already done tests in which this step I did through special written and read txt (taking inspiration from the example of the post mentioned).

But since I was able to eliminate the txt in step [au3-->JD] I'm trying to understand if there is a way not to use them also for [JD-->au3]
Reply With Quote
  #1292  
Old 22.03.2020, 16:52
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,553
Default

Quote:
Originally Posted by BJN01 View Post
I'm trying to understand if there is a way not to use them also for [JD-->au3]
Only the variable value (" insert here sometjing ... please ") will be passed to the au3 script, and not the varaible name ($SHText). I took a quick glance at autoit doc. Looks like you will need to use $CmdLine[1] (first parameter passed to the script from CLI) to access the variable value in au3 script and not ConsoleRead($SHText).

Code:
www.autoitscript.com/autoit3/docs/intro/running.htm
Reply With Quote
  #1293  
Old 22.03.2020, 18:13
BJN01 BJN01 is offline
JD Adviser
 
Join Date: Jan 2020
Posts: 113
Default

yessss !! that's exactly what I'm looking for !!

Thanks again
Reply With Quote
  #1294  
Old 02.04.2020, 20:51
pir8mack pir8mack is offline
Modem User
 
Join Date: Apr 2020
Posts: 2
Default

Hi Guys,

Would be very grateful if someone could tell me how to convert a colon to hyphen in the package name.

Basically I want (word: word) converted to (word - word) wherever a colon might occur in the text at the moment it converts a colon to an underscore, so the folder name is formatted correctly.

i'm not too good with the app so not sure where to do all this.
Reply With Quote
  #1295  
Old 03.04.2020, 05:59
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,614
Default

@pir8mack
there is a map of illegal characters that are changed at the core, as in before package customiser/eventscripter even knows about it, so I don't believe there is a way at this time to alter this at this time. Though I do believe there is a svn ticket to change this behaviour.
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #1296  
Old 03.04.2020, 06:59
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,553
Default

Quote:
Originally Posted by pir8mack View Post
... convert a colon to hyphen in the package name.
Please PM some example urls to me.
Reply With Quote
  #1297  
Old 04.04.2020, 03:05
aukaauka aukaauka is offline
Modem User
 
Join Date: Apr 2020
Posts: 2
Default

Hi, I was wondering if it is possible to have jdownloader make the thumbnail image of a youtube video the thumbnail image of the audio file?

Usually I manually do this with mp3tag after each download but was wondering if this could be done automatically with a script as soon as it's finished downloading.

I saw a couple of posts about a few things similar to this but I don't know much about script and haven't managed to work it out myself.

Many Thanks
Reply With Quote
  #1298  
Old 04.04.2020, 06:11
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,553
Default

Quote:
Originally Posted by aukaauka View Post
... jdownloader make the thumbnail image of a youtube video the thumbnail image of the audio file ...
This script uses an external program to add images to video file. You can modify it to tag audio files, using the same external program (if it supports it) or use a different tagger which can be run in CLI.
Reply With Quote
  #1299  
Old 05.04.2020, 14:01
sherbee sherbee is offline
JD Fan
 
Join Date: Mar 2019
Posts: 76
Default Extract archive?

Need manual extract many archives.
But not to find a method to start extraction. Am I blind?
I want become download list. And for every unextracted I want to start extract.
Reply With Quote
  #1300  
Old 05.04.2020, 14:35
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,553
Default

Quote:
Originally Posted by sherbee View Post
Need manual extract many archives. But not to find a method to start extraction.
You will need to use the "startExtractionNow" MYJD API using the callAPI() method:

Code:
https://my.jdownloader.org/developers/#tag_195

Let me know if you need any help with it.
Reply With Quote
  #1301  
Old 05.04.2020, 15:45
sherbee sherbee is offline
JD Fan
 
Join Date: Mar 2019
Posts: 76
Default

Quote:
Originally Posted by mgpai View Post
You will need to use the "startExtractionNow" MYJD API using the callAPI() method:

Code:
https://my.jdownloader.org/developers/#tag_195

Let me know if you need any help with it.
I will look for it. Does it respect extraction settings from Extractor plugin?
Reply With Quote
  #1302  
Old 05.04.2020, 16:05
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,553
Default

Quote:
Originally Posted by sherbee View Post
... Does it respect extraction settings from Extractor plugin?
Yes.
Reply With Quote
  #1303  
Old 06.04.2020, 11:01
sherbee sherbee is offline
JD Fan
 
Join Date: Mar 2019
Posts: 76
Default Pause between download starts?

Is possible to make 1 download after another with pause between?
Say when many downloads start at the same time, but thats not good.
I want start 1 download, wait x seconds, next downloads, wait again x seconds. And so on.
So not downloads start at the same time.
Reply With Quote
  #1304  
Old 06.04.2020, 14:04
MaxPower MaxPower is offline
Modem User
 
Join Date: Nov 2019
Posts: 4
Default

Hello,

i have a small problem but it is not solvable without a Script.

I have searched this thread for the solution but i only understand nothing. In german we say "Ich verstehe nur Bahnhof" because i am a noob in programming.

My problem is not solvable with only the linkcrawler rules.

The Tab title should be the package name and only the biggest package (Best quality) should be downloaded. And only from one hoster (Uploaded).

Here is a sample link

**External links are only visible to Support Staff****External links are only visible to Support Staff**


Only Full HD Download, with Tab title as package name (which contains actor, title and production company) and only from Uploaded. Is this possible and can someone write me a script?

Greetings from germany
Reply With Quote
  #1305  
Old 06.04.2020, 16:19
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,553
Default

Quote:
Originally Posted by sherbee View Post
I want start 1 download, wait x seconds, next downloads, wait again x seconds. And so on. So not downloads start at the same time.
While it can done using a script, I would recommend to first try the advanced settings, which was also suggested in your other thread.

Set target speed to more than your connection speed. For e.g., if you have a 50 Mbit connection, and you need to start a download every 30 seconds, limiting max dowloads to 20, use the following:

GeneralSettings.automaxdownloadsspeedlimit : 7500000 [bytes]
GeneralSettings.automaxdownloadsspeedlimitmaxdownloads : 20
GeneralSettings.automaxdownloadsspeedlimitmindelay : 30000 [milliseconds]

Please note, the max. sim. download in GUI will always show '1', since JD will automatically increase it based on your setting and reset it again.
Reply With Quote
  #1306  
Old 06.04.2020, 16:27
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,553
Default

Quote:
Originally Posted by MaxPower View Post
i have a small problem but it is not solvable without a Script.
You can use linkcrawler and packagzier rule.
  • Create a pacakagizer rule to grab the links. Set "packagnamePattern" from the 'title' tag. Use 'deepPattern' to grab the matching links.
  • Download the file using the original name.
  • Create a packagizer rule to rename the extracted files by package name, after they are extracted.
Reply With Quote
  #1307  
Old 06.04.2020, 16:30
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 71,117
Default

@mgpai
Indeed you are right lol.

I've told this user already that it would be impossible usign only LinkCrawler rules.
Sorry and thanks for the hints

But this is only half of what he wants ...
He wants to have only the BEST quality downloadurls from that site which is, if you ask me, not possible using our simple LinkCrawler rules.


-psp-
__________________
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
  #1308  
Old 06.04.2020, 16:57
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,553
Default

Quote:
Originally Posted by pspzockerscene View Post
But this is only half of what he wants ...
He wants to have only the BEST quality downloadurls from that site which is, if you ask me, not possible using our simple LinkCrawler rules.
While eventscripter is suitable to add links using API, its browser methods are not reliable enough to crawl/parse html to generate links, due to lack of feedback on error.

I had a quick look at the page source and this regex should return all Full HD links. In case it is not possible to isolate the preferred hoster links in the deeppattern code, a linkfilter rule can be use to block unwanted hosts.

Perhaps you could help implementing it in the linkcrawler rule.

Code:
regex101.com/r/x9BhMi/1
Reply With Quote
  #1309  
Old 06.04.2020, 18:00
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 71,117
Default

You mean like this?
Code:
[ {
  "enabled" : true,
  "updateCookies" : true,
  "logging" : false,
  "maxDecryptDepth" : 1,
  "name" : "girlscanner.cc example best quality only",
  "pattern" : "**External links are only visible to Support Staff**,
  "rule" : "DEEPDECRYPT",
  "packageNamePattern" : null,
  "passwordPattern" : null,
  "formPattern" : null,
  "deepPattern" : "(?s)(FoLinks.+?FoLinks)",
  "rewriteReplaceWith" : null
} ]
This gets me more than just the full HD URLs.
Hm but e.g. this one does not work for me either (and yes I know it is not complete yet):
Code:
[ {
  "enabled" : true,
  "updateCookies" : true,
  "logging" : false,
  "maxDecryptDepth" : 1,
  "name" : "girlscanner.cc example best quality only",
  "pattern" : "**External links are only visible to Support Staff**,
  "rule" : "DEEPDECRYPT",
  "packageNamePattern" : null,
  "passwordPattern" : null,
  "formPattern" : null,
  "deepPattern" : "data-target=\"FullHD\"(.+)",
  "rewriteReplaceWith" : null
} ]
-psp-
__________________
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
  #1310  
Old 13.04.2020, 11:29
qayaq qayaq is offline
Super Loader
 
Join Date: Mar 2019
Posts: 29
Default Instagram

Hi mgpai
The Instagram plug-in allows only the last x files to be downloaded. But this doesn't work correctly. It would also be much better to be able to specify an earliest upload date.
I have 5k urls in my txt file. jdownloader crashes when I load more than few 100 at a time. Why?
Do you know any tricks to work around these problems?
Greetings, Sergei

Last edited by qayaq; 13.04.2020 at 12:15.
Reply With Quote
  #1311  
Old 13.04.2020, 13:24
HeinerL HeinerL is offline
I will play nice!
 
Join Date: Apr 2020
Posts: 3
Default Convert to MP3 Event Scripter doesn't work

Hello,

I am new to this forum and no native speaker of English. So, hopefully I can convey my point in an understandable fashion.

I read on this board about the possibility to convert downloads to MP3 via the employment of the event scripter.
I also found the sticky thread with the event scripter scripts and the regarding script.

// Convert aac/m4a/ogg files to mp3.
// Trigger required: "A Download Stopped".
// Requires ffmpeg/ffprobe. Uses JD ffmpeg/ffprobe settings if available.
// Overwrites destination file (mp3) if it already exists.

if (link.isFinished()) {

var fileName = link.name.replace(/(.+)(\..+$)/, "$1");
var fileType = link.name.replace(/(.+)(\..+$)/, "$2");
var sourceFile = link.getDownloadPath();
var audioFile = /\.(aac|m4a|ogg)$/.test(sourceFile);

if (audioFile) {
var downloadFolder = package.getDownloadFolder();
var destFile = downloadFolder + "/" + fileName + ".mp3";
var ffmpeg = callAPI("config", "get", "org.jdownloader.controlling.ffmpeg.FFmpegSetup", null, "binarypath");
var ffprobe = callAPI("config", "get", "org.jdownloader.controlling.ffmpeg.FFmpegSetup", null, "binarypathprobe");
var data = JSON.parse(callSync(ffprobe, "-v", "quiet", "-print_format", "json", "-show_streams", "-show_format", sourceFile));
var streamsBitrate = data.streams[0].bit_rate ? data.streams[0].bit_rate : 0;
var formatBitrate = data.format.bit_rate ? data.format.bit_rate : 0;
var bitrate = Math.max(streamsBitrate, formatBitrate) / 1000;
var deleteSourceFile = false; // Set this to true to delete source file after conversion.

if (bitrate > 0) {
callSync(ffmpeg, "-y", "-i", sourceFile, "-b:a", bitrate + "k", destFile);
if (deleteSourceFile && getPath(destFile).exists()) deleteFile(sourceFile, false);
}
}
}

I have to admit that I have not the first idea about scripting at all. So, I copied and pasted the script into the event scripter.

When I click on testrun it says it failed because in line 6 the link is not defined. I think it's the line which I highlighted. I did the highlighting just in this post not in the event scripter.

I don't know how to fix this problem but I hope you can help me with this.

I appreciate you took the time to read this.

Greetings
Reply With Quote
  #1312  
Old 14.04.2020, 13:24
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 71,117
Default

Merged EventScripter threads.

-psp-
__________________
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
  #1313  
Old 15.04.2020, 18:23
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,553
Default

Quote:
Originally Posted by HeinerL View Post
... When I click on testrun it says it failed because in line 6 the link is not defined ...
It is because the required data is not present during 'test run'. It will be available only when the download is finished.

Make sure you have selected the correct trigger and enabled the script. Matching files should then be automatically converted when the download is completed.
Reply With Quote
  #1314  
Old 17.04.2020, 19:56
Mnk3y Mnk3y is offline
I will play nice!
 
Join Date: Apr 2020
Posts: 2
Default

Hello, I hope I can ask my question here. Maybe there is someone who could help me with it or maybe there is already a script.

The script should do the following:

After unpacking all archives of a JDownloader package all files in this package should be renamed.

Example:

The package in JDownloader is called "Movie (2020)". JDownloader is set to create a folder named like the package. After downloading and unpacking, the files should be renamed to the package name.

For subtitles the language and if necessary "forced" should be appended. If "eng" found in file name add ".eng" else ".ger" and if "forced" found in file name add ".forced".
These files are usually in a "Subs" folder and should be moved to the root directory "Movie (2020)".

movie.2020.1080p.mkv -> Movie (2020)
subs/movie.2020.1080p-ger.sub/idx -> Movie (2020).ger.sub/idx
subs/movie.2020.1080p-ger.forced.sub/idx -> Movie (2020).ger.forced.sub/idx

Is it possible to implement this with regex via the Event Scripter?

Thanks in advance!
Reply With Quote
  #1315  
Old 18.04.2020, 11:31
swissglider swissglider is offline
Modem User
 
Join Date: Apr 2020
Posts: 1
Default Script mit MoveTo mounted share - ubuntu

Hallo zusammen,

ich habe ein Script geschrieben, welches auch super funktioniert.
Aber leider nur, wenn ich das Verzeichnis welches ich kopieren will, in einen lokalen Ordner verschiebe mit moveTo().
Ist der Ordner ein mount, geht es nicht.
Es haben beide Ordner die selben rechte und laufen auch unter dem selben user.
Wenn ich im JDownlaoder den selben gemounteden Pfad als extracted Folder angebe, geht es auch nicht...

Wie gesagt, JDownload läuft mit dem selben user wie der share in fstab gemounted ist. (cifs)
Wenn ich unter diesem user von Hand ein Verzeichnis mache, geht es auch.

Auf was muss ich noch achten ?

Vielen Dank für die Hilfe
Reply With Quote
  #1316  
Old 18.04.2020, 13:14
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,553
Default

Quote:
Originally Posted by Mnk3y View Post
... Is it possible to implement this with regex via the Event Scripter? ...
Can use packagizer rules to move/rename files after extraction.
Reply With Quote
  #1317  
Old 20.04.2020, 13:51
drjs5x drjs5x is offline
Baby Loader
 
Join Date: Nov 2015
Posts: 8
Post how can event sctipt if file size then set skip file a packet downloading... ??

hi dear coders
how can event sctipt if file size then set skip file a packet downloading... ??

example

if file size => 50 set skipped...

PACKET ANIMALS
monkey.wmw 900mb skipped
eagle.mp4 45 mb download...
fish.3gp 40 mb dowwnload...
test.mp4 65 mb skipped .







please help me
Reply With Quote
  #1318  
Old 20.04.2020, 13:54
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 71,117
Default

Merged EventScripter threads.

-psp-
__________________
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
  #1319  
Old 20.04.2020, 14:45
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,553
Default

Quote:
Originally Posted by drjs5x View Post
how can event sctipt if file size then set skip file a packet downloading... ??
Code:
// Skip links based on size and package name
// Trigger: A Download Started

var myPackageNames = ["package one", "package two", "package three"]; // Set package names to match (case-sensitive)
var myLimit = 50; // <- Set size limit in MB

var packageName = link.getPackage().getName();
var bytesTotal = link.getBytesTotal();

if (myPackageNames.indexOf(packageName) > -1 && bytesTotal > myLimit * 1000 * 1000) link.setSkipped(true);
Reply With Quote
  #1320  
Old 20.04.2020, 16:31
drjs5x drjs5x is offline
Baby Loader
 
Join Date: Nov 2015
Posts: 8
Default dear each links all links

var links = getRunningDownloadLinks();
var skipped = [];
for (i = 0; i < links.length; i++) {
var link = links[i];

//alert(link.getBytesTotal());

if (link.getBytesTotal() < 654665445655643145728) {
sleep(1000);
link.setSkipped(true);
} else {
continue;
}



}

if skip link wait 1 seconds after next link check etc..
resume.
but i cant..
please help me.
:outch:

Last edited by drjs5x; 20.04.2020 at 16:33.
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 01:32.
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.