JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #2521  
Old 10.12.2022, 04:54
Rhamlock Rhamlock is offline
Baby Loader
 
Join Date: Dec 2022
Posts: 5
Cool I'm trying to first convert M4A to MP3 and then add the PNG as art cover

Hello everyone!
I'm currently trying to download a song from YT
the song downloads as M4A, then using the power of the Event Script it gets converted to Mp3 using the second script on this thread
https://board.jdownloader.org/showthread.php?t=70525

And because I'm downloading the JPG together with the M4A, I try to use another script to set the cover art on the resulting Mp3
using the script at the very end of this thread
https://board.jdownloader.org/showthread.php?t=87059

Mixing both scripts, I get this.

Code:
/*
    Convert audio files to mp3 format
    Trigger : A download stopped
*/

if (link.finished) {
    var input = link.downloadPath;
    var output = input.replace(/(aac|m4a|ogg|opus)$/, "mp3");

    if (input != output) {
        try {
            var ffmpeg = callAPI("config", "get", "org.jdownloader.controlling.ffmpeg.FFmpegSetup", null, "binarypath");
            var bitrate = callSync(ffmpeg, "-i", input).match(/bitrate: (\d+) kb/)[1];

            callAsync(function(error) {
                !error && getPath(input).delete();
            }, ffmpeg, "-y", "-i", input, "-b:a", bitrate + "k", output);
        } catch (e) {};
    }
}
   
/*
    Add cover art
    Trigger : Package finished
*/ 

var links = package.downloadLinks.filter(function(link) {
    return link.host == "youtube.com" && getPath(link.downloadPath).extension == "mp3";
})


if (links.length) {
    var ffmpeg = callAPI("config", "get", "org.jdownloader.controlling.ffmpeg.FFmpegSetup", null, "binarypath");

    links.forEach(function(link) {
        var cover = getPath(link.downloadPath.replace(/_\d{9}/, "_original_").replace(/mp3$/, "jpg"));

        if (cover.exists()) {
            var input = link.downloadPath;
            var output = input + ".mp3";

            callAsync(function(exitCode) {
                if (exitCode == 0) {
                    getPath(input).delete();
                    getPath(output).renameTo(input);
                }
            }, ffmpeg, "-hide_banner", "-i", input, "-i", cover, "-map", "0:0", "-map", "1:0", "-c", "copy", output);
        }
    })
}

Now the problem is I seem to be able to download the song on M4A and then convert it to MP3, however, I can't get the jpg to be set as the art for the MP3.

Any ideas how to solve this?
thanks in advance!

Last edited by Rhamlock; 10.12.2022 at 05:10.
Reply With Quote
  #2522  
Old 12.12.2022, 15:48
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 81,049
Default

@Rhamlock: have you tested the command line outside of JDownloader first, to make sure it's correct and working?
Quote:
var links = package.downloadLinks.filter(function(link) {
return link.host == "youtube.com" && getPath(link.downloadPath).extension == "mp3";
})
this will not work because the first part of the script just converts to mp3 but the entry in list still has original extension.
you should rewrite/change it so script waits for audio+cover to be finished and then do the conversion at once
__________________
JD-Dev & Server-Admin

Last edited by Jiaz; 12.12.2022 at 15:52.
Reply With Quote
  #2523  
Old 13.12.2022, 22:04
Rhamlock Rhamlock is offline
Baby Loader
 
Join Date: Dec 2022
Posts: 5
Default

Quote:
Originally Posted by Jiaz View Post
@Rhamlock: have you tested the command line outside of JDownloader first, to make sure it's correct and working?

this will not work because the first part of the script just converts to mp3 but the entry in list still has original extension.
you should rewrite/change it so script waits for audio+cover to be finished and then do the conversion at once
The problem is I can't add the art first, since the file is being downloaded as M4A.
Should I convert the M4A to mp3 first, and then add the art to the MP3?

I tried adding the jpg as art cover directly to the M4A, and it didn't work

Code:
/*
    Add cover art
    Trigger : Package finished
*/ 

var links = package.downloadLinks.filter(function(link) {
    return link.host == "youtube.com" && getPath(link.downloadPath).extension == "m4a";
})


if (links.length) {
    var ffmpeg = callAPI("config", "get", "org.jdownloader.controlling.ffmpeg.FFmpegSetup", null, "binarypath");

    links.forEach(function(link) {
        var cover = getPath(link.downloadPath.replace(/_\d{9}/, "_original_").replace(/m4a$/, "jpg"));

        if (cover.exists()) {
            var input = link.downloadPath;
            var output = input + ".m4a";

            callAsync(function(exitCode) {
                if (exitCode == 0) {
                    getPath(input).delete();
                    getPath(output).renameTo(input);
                }
            }, ffmpeg, "-hide_banner", "-i", input, "-i", cover, "-map", "0:0", "-map", "1:0", "-c", "copy", output);
        }
    })
}
Just replaced every mp3 for m4a.
checking reddit I found that m4a doesn't support art cover, that's why this doesn't work
Reply With Quote
  #2524  
Old 13.12.2022, 22:17
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 81,049
Default

@Rhamlock: The idea was to move the m4a->mp3 conversion before the embedding of cover art. so package finished trigger, then every m4a file, then for each file with cover, first convert to mp3 and then add the cover. try to just add the mp3 stuff before the var cover... stuff
__________________
JD-Dev & Server-Admin
Reply With Quote
  #2525  
Old 14.12.2022, 03:59
markifi markifi is offline
Junior Loader
 
Join Date: May 2020
Posts: 13
Default

what am i messing up with the notation here?
Quote:
callAsync(null, "if", "[", "!", "$(pgrep", "xdotool)", "]\;", "then", "xdotool", "getactivewindow", "sleep", "10", "windowactivate\;", "else", "sleep", "1\;", "fi\;");
i'm trying to do
Quote:
if [ ! $(pgrep xdotool) ]; then xdotool getactivewindow sleep 10 windowactivate; else echo "it's running"; fi;^C
if xdotool isn't running, run it, get the active window, sleep ten seconds and activate the same window regardless of something else opening in the meantime, if xdotool is running don't do anything basically. i'm having the mpv media player play whatever is downloaded on package finished but i can't figure out a better way to have it in the background than this, xdotool just activates the window that was already active before. and that works fine with
Quote:
xdotool getactivewindow sleep 10 windowactivate
but if multiple things get downloaded within that ten second time it gets confused as to which window it should switch back to if that makes any sense
Reply With Quote
  #2526  
Old 14.12.2022, 04:33
Rhamlock Rhamlock is offline
Baby Loader
 
Join Date: Dec 2022
Posts: 5
Default

Quote:
Originally Posted by Jiaz View Post
@Rhamlock: The idea was to move the m4a->mp3 conversion before the embedding of cover art. so package finished trigger, then every m4a file, then for each file with cover, first convert to mp3 and then add the cover. try to just add the mp3 stuff before the var cover... stuff
This is my test so far.
I divided the script into two different events
The result is the same, I can convert to mp3 no problem.
But I can't add the jpg as cover art on the mp3.
Here a couple pictures
**External links are only visible to Support Staff****External links are only visible to Support Staff**
**External links are only visible to Support Staff****External links are only visible to Support Staff**

I found this thread where there is a different script for the mp3 cover
https://board.jdownloader.org/showth...=mp3+cover+art
but it seems it only works with soundcloud files.

Code:
// Add album art (if available) to mp3 audiofiles from soundcloud.com
// Trigger : "Package Finished"
// Uses "original thumbnail" from soundcloud for album art
// Can also be used to add title, url and other metadata to the audio file

var links = package.getDownloadLinks();

for (i = 0; i < links.length; i++) {
    var link = links[i];
    var host = link.getHost();
    var fileType = getPath(link.getDownloadPath()).getExtension();

    if (host == "soundcloud.com" && fileType == "mp3") {
        var downloadFolder = link.getPackage().getDownloadFolder();
        var plainFileName = link.getProperty("plainfilename");
        var linkID = link.getProperty("linkid");
        var channel = link.getProperty("channel");
        var coverFileName = plainFileName + "_original_" + linkID + " - " + channel + ".jpg";
        var coverFile = getPath(downloadFolder + "/" + coverFileName);

        if (coverFile.exists()) {
            var tagger = "ffmpeg";
            var audioFile = link.getDownloadPath();

            callSync(tagger, "-i", audioFile, "-i", coverFile, "-c copy -map 0 -map 1", plainFileName, ".mp3");
            //coverFile.delete(); // Delete cover file
        }
    }
}

Last edited by Rhamlock; 14.12.2022 at 04:38.
Reply With Quote
  #2527  
Old 14.12.2022, 11:31
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 81,049
Default

@markifi: callasync calls an external application/binary/script but you can't place bash commands in there! I would recommend to place that all in a ready bash script and use the callsync method to execute it. for example
Code:
#!/bin/bash
if [ ! $(pgrep xdotool) ]; then xdotool getactivewindow sleep 10 windowactivate; else echo "it's running"; fi;
chmod +x it and then use callSync for that script
__________________
JD-Dev & Server-Admin
Reply With Quote
  #2528  
Old 14.12.2022, 11:36
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 81,049
Default

@Rhamlock: Can you please send me an email to support@jdownloader.org and then I will take a look at it myself. Currently just very busy. I don't see any reason why it should not work when both scripts are placed in one. most likely just a simple misstake. can you please send me a reminder and link to your post?
__________________
JD-Dev & Server-Admin
Reply With Quote
  #2529  
Old 15.12.2022, 01:57
Rhamlock Rhamlock is offline
Baby Loader
 
Join Date: Dec 2022
Posts: 5
Default

Quote:
Originally Posted by Jiaz View Post
@Rhamlock: Can you please send me an email to support@jdownloader.org and then I will take a look at it myself. Currently just very busy. I don't see any reason why it should not work when both scripts are placed in one. most likely just a simple misstake. can you please send me a reminder and link to your post?
sure I compile them all.
Reply With Quote
  #2530  
Old 15.12.2022, 03:04
SMS SMS is offline
Mega Loader
 
Join Date: Jun 2019
Posts: 66
Default

Hi! I'm trying to add an additional download from a script whose Trigger is "Packagizer Hook". I try:

Code:
		myObject = callAPI("linkgrabberv2", "addLinks", {
			"links": link,
			"packageName": packageName,
			"destinationFolder": destinationFolder
		});
But the plugin that handles that newly added link (mega co nz) overrides the packageName and destinationFolder in some cases (when the link is a mega co nz folder with several files).

How can I influence the packageName OR destinationFolder?

Maybe the aforementioned myObject somehow allows finding the links in the LinkGrabber and changing the package name? alert(myObject); yields just a number, I don't know what I can do with that number.

A separate Event Scripter script that catches the links added by the mega co nz plugin wouldn't know what package name the original script wanted.
Reply With Quote
  #2531  
Old 18.12.2022, 21:58
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 81,049
Default

@SMS: You have to enable overwritePackagizerRules , else the destination folder/package name set by Plugin and/or Packagizer Rules will be applied.
with overwritePackagizerRules true, you tell JDownloader that you custom package name and/or directory should be used
see https://my.jdownloader.org/developers/#tag_244 for the fields of addLinks
__________________
JD-Dev & Server-Admin
Reply With Quote
  #2532  
Old 23.12.2022, 13:46
marko117 marko117 is offline
Junior Loader
 
Join Date: Jul 2017
Posts: 10
Default Function to count package

Hi everyone.
Is there a function that allows me to save the number of packages in my Download list in a variable?
Basically I'm using this script to merge packages with the same name:
Code:
if (name == "Merge Packages") {
    alert("Merging...");
    var count=0;   //used to count merged packages
    getAllFilePackages().forEach(function(package) {

        if (package) {
            var packages = [];

            getAllFilePackages().forEach(function(package2) {
                if (package2.name + package2.downloadFolder == package.name + package.downloadFolder) {
                    packages.push(package2);
                }
            })

            if (packages.length > 1) {
                var linkIds = [];

                packages.forEach(function(package3) {
                    package3.downloadLinks.forEach(function(link) {
                        linkIds.push(link.UUID);
                    })
                })

                linkIds.sort().forEach(function(linkId) {
                    callAPI("downloadsV2", "moveLinks", [linkId], -1, package.UUID);
                })
                count++;
            }
        }
    })
    alert("Merged: "+count);
}
but I have a lot of packages and I wanted to print a progress percentage on a popup using alert()
25%, 50%, 75 and 90%
using the percentage formula:
tot*0.25, tot*0.50....
in pseudo code
Code:
tot=countFunction() //or similar
....
....
if(actualPackage==tot*0.25)
       alert("progress 25%")
......
.......
do you have any idea how to count all the packages?
Reply With Quote
  #2533  
Old 23.12.2022, 14:02
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 81,049
Default

Quote:
Originally Posted by marko117 View Post
Hi everyone.
Is there a function that allows me to save the number of packages in my Download list in a variable?
do you have any idea how to count all the packages?
@marko117: getAllFilePackages() does return all packages, so why not simply use getAllFilePackages().length :? eg
Quote:
var numPackages=getAllFilePackages().length;
__________________
JD-Dev & Server-Admin
Reply With Quote
  #2534  
Old 23.12.2022, 20:23
marko117 marko117 is offline
Junior Loader
 
Join Date: Jul 2017
Posts: 10
Default

Quote:
Originally Posted by Jiaz View Post
Code:
var numPackages=getAllFilePackages().length;
Perfect. This works!
Thanks
Reply With Quote
  #2535  
Old 25.12.2022, 21:30
Rhamlock Rhamlock is offline
Baby Loader
 
Join Date: Dec 2022
Posts: 5
Default

Quote:
Originally Posted by Jiaz View Post
@Rhamlock: Can you please send me an email to support@jdownloader.org and then I will take a look at it myself. Currently just very busy. I don't see any reason why it should not work when both scripts are placed in one. most likely just a simple misstake. can you please send me a reminder and link to your post?
Hey Jiaz, did you get the email?
I still want to do that thing with conversion then cover addition.
But I haven't find a way
Reply With Quote
  #2536  
Old 30.12.2022, 12:32
Dockel Dockel is offline
JD Legend
 
Join Date: Feb 2020
Posts: 700
Default Automatically turn off silent mode after 3 hours (to avoid forgetting turning off)

Is there a way to automatically deactivate the "Silent Mode" after a certain time after switching it on? E.g. different timer settings: after 2, 3, 4, 5 hours after activating the "Silent Mode" etc. should the "Silent Mode" switch off again automatically?

I often forget to turn it back on myself after I've turned it on for a while.

https://board.jdownloader.org/showth...279#post515279
__________________
Aktuelles Windows
Reply With Quote
  #2537  
Old 30.12.2022, 14:37
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 81,049
Default

@Rhamlock: Yes, but I did not yet find time for it, sorry.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #2538  
Old 04.01.2023, 10:21
reddy.shyam reddy.shyam is offline
Fibre Channel User
 
Join Date: Aug 2013
Posts: 123
Default

Quote:
Originally Posted by mgpai View Post
Code:
/*
    Randomize download order
    Trigger: Download controller started
*/

var index, priorities = ["HIGHEST", "HIGHER", "HIGH", "DEFAULT", "LOW", "LOWER", "LOWEST"];

getAllDownloadLinks().forEach(function(link) {
    if (!link.finshed) {
        index = Math.floor(Math.random() * priorities.length);
        link.priority = priorities[index];
    }
})
Hi guys,

Good day! Happy New Year!

Help needed again please. I have expanded the above script to suit my needs which would get certain links matching names enabled and rest disabled. My issue now is that when the links get updated, I do not see the active ones under 'Downloads' tab. I have to go any other tab and come back to see the latest links.

Is there anyway to refresh the UI to see the latest links please?
Reply With Quote
  #2539  
Old 07.01.2023, 02:14
Alexpark24 Alexpark24 is offline
Junior Loader
 
Join Date: Jan 2023
Posts: 13
Default

Good Gentlemen, I would like to know if there is any way that Jdownloader 2 can read the links saved in an X link history folder and that when the file is previously downloaded it marks it as if it were downloading in red or if it can be another color Whatever, if there is a script for that or if something occurs to you, please tell me the code. Thank you very much. In the same way, I thank you for paying attention to me and I currently have a script from here that It creates a text file per day, I wish it was just one and they simply added more links, but it creates 1 text file per day with date. If there is a way for a script to filter those links where it is generated in the auto folder I would appreciate it very much. i use this
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);
}

Last edited by Alexpark24; 10.01.2023 at 17:52.
Reply With Quote
  #2540  
Old 19.01.2023, 14:55
Richardcaq Richardcaq is offline
Registered / Inactive
 
Join Date: Jan 2021
Posts: 3
Default

can someone make me a script that download 1% of the file then stops and disable that file (gray it out) then move to the next file and do the same , not required the downloaded size is 1% it just need to download some data from that file whether 1% or download for 10 second then gray it out then move to the next one.
Reply With Quote
  #2541  
Old 19.01.2023, 14:55
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 73,118
Default

Sounds like a script you want to use to either generate clicks and/or keep files online(?)
__________________
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
  #2542  
Old 19.01.2023, 16:35
Richardcaq Richardcaq is offline
Registered / Inactive
 
Join Date: Jan 2021
Posts: 3
Default

Quote:
Originally Posted by pspzockerscene View Post
Sounds like a script you want to use to either generate clicks and/or keep files online(?)
I'm downloading 2TB worth of files and each files require captcha , that for normal user but once captcha is entered it's not required again, i want to load some bytes of that file (1%) so when my premium account ends i don't need to keep entering captcha each 1 minute...... it's like 1k files + and on each download need to wait 90 second that too much time ...
Reply With Quote
  #2543  
Old 19.01.2023, 16:48
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 73,118
Default

Ah I understand I didn't think of this.
Keep in mind though that those pre-generated direct-URLs may expire after a specified amount of time and/or once your IP changes.

Also, where are you downloading from - usually in premium mode, captchas are not required.
__________________
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
  #2544  
Old 19.01.2023, 16:55
Richardcaq Richardcaq is offline
Registered / Inactive
 
Join Date: Jan 2021
Posts: 3
Default

Quote:
Originally Posted by pspzockerscene View Post
Ah I understand I didn't think of this.
Keep in mind though that those pre-generated direct-URLs may expire after a specified amount of time and/or once your IP changes.

Also, where are you downloading from - usually in premium mode, captchas are not required.

they are not generated .. they are to my luck static the function of captcha was just added for normal users lately due to server load so it's fine .
Reply With Quote
  #2545  
Old 19.01.2023, 17:05
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 73,118
Default

Okay.

Well then good luck with that script!
__________________
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
  #2546  
Old 20.01.2023, 10:50
kantutan kantutan is offline
Junior Loader
 
Join Date: Sep 2020
Posts: 10
Default

Hi

Please help me update this code
I want this code to run only under a package-name
For Example Package name is "10GB" all files under that package will run this code

Trigger: A Download Stopped
Code:
// Move downloaded files to user-specified folder
// Trigger: A Download Stopped

if (link.finished) {
    var destinationFolder = "/Users/admin/Desktop/Download/JDownloader/";
    getPath(link.downloadPath).moveTo(destinationFolder);
}

I'm using a certain program that auto-upload the files under that folder
if i use that as download directory it won't start uploading, probably because the temp file is on that folder and when it completes it ignores it. so I have to move it to different folder and then put it back so it start uploading.

Thanks
Reply With Quote
  #2547  
Old 22.01.2023, 21:03
tribumx tribumx is offline
I will play nice!
 
Join Date: Jul 2022
Posts: 1
Default EventScript with extracted Archive Name

Is it possible to access the extracted Archive Name? Can't find the value here in examples of scripts or in the API?

I can get the ArchiveName how the archive itself is named. But not the folder name inside the archive what is extracted. I want to access it and pass it as an argument to my python script. Any clues?

Code:
disablePermissionChecks();

var extractionFolder;
var archiveName;

package.getArchives().forEach(function (archive) {
  archiveName = archive.getName();
  archive.getDownloadLinks().forEach(function (link) {
    while (
      link.getExtractionStatus() == "IDLE" ||
      link.getExtractionStatus() == "RUNNING"
    )
      sleep(1000);
  });
});

var packagename = package.getName();
var folderLocation = package.getDownloadFolder();
var cmd = "python";
var script = "/output/Scripts/Uppy/sorter.py";

alert(packagename, extractionFolder, archiveName)

var command = [cmd, script, packagename, folderLocation, extractionFolder]
alert(callSync(command))
Reply With Quote
  #2548  
Old 02.02.2023, 21:29
Leonfake Leonfake is offline
Junior Loader
 
Join Date: Aug 2020
Posts: 10
Default

Hello,

Please, I'm doing downloads from Pixeldrain, and apparently even if I set max download from host to 1, it starts to ask recaptcha, maybe because I start the next download too fast after the last one finish.

Would someone help me write a script just to wait like 60 seconds, between a finished download and the start of a new one?

Last edited by Leonfake; 02.02.2023 at 21:58.
Reply With Quote
  #2549  
Old 03.02.2023, 13:36
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 73,118
Default

So pixeldrain.com captchas can be avoided by waiting?
If yes: Waiting is enough or is an IP change required?

If you want I can add a plugin setting for that.
__________________
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
  #2550  
Old 03.02.2023, 16:28
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 73,118
Default

Nevermind I figured it out on my own.

I've added a plugin setting which lets you customize the behavior for pixeldrain whenever a captcha is required.
At this moment the wait time is hardcoded (5 minutes) whenever a captcha is needed but you prefer to wait.

Screenshot of the new setting (you will get that with our next set of CORE-updates):


Bitte auf das nächste CORE-Update warten!

Please wait for the next CORE-Update!

Wartest du auf einen angekündigten Bugfix oder ein neues Feature?
Updates werden nicht immer sofort bereitgestellt!
Bitte lies unser Update FAQ! | Please read our Update FAQ!

---
Are you waiting for recently announced changes to get released?
Updates to not necessarily get released immediately!
Bitte lies unser Update FAQ! | Please read our Update FAQ!


-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?

Last edited by pspzockerscene; 03.02.2023 at 16:29. Reason: Added screenshot
Reply With Quote
  #2551  
Old 06.02.2023, 14:30
Leonfake Leonfake is offline
Junior Loader
 
Join Date: Aug 2020
Posts: 10
Default

Quote:
Originally Posted by pspzockerscene View Post
So pixeldrain.com captchas can be avoided by waiting?
If yes: Waiting is enough or is an IP change required?

If you want I can add a plugin setting for that.
Hello! Sorry for taking long to reply, I was a bit away from PC this weekend.

About the question, I think yes, but, also there is some files which ask for captcha because they say them have "unsual traffic", but, if you have a lot of files from Pixeldrain in queue, and one asks for captcha, the other ones will start to ask too.

There is another thing, when I'm starting them manually, and a file asks for captcha, so I go to another after a few time, it starts normally. But if JD does that, he does very fast, and then maybe the Pixeldrain detect suspicious action, starting to ask captcha for all files.

I don't know if after a certain time it resets, I was using a VPN to change IP everytime it started to ask captcha for all files.

Quote:
Originally Posted by pspzockerscene View Post
Nevermind I figured it out on my own.

I've added a plugin setting which lets you customize the behavior for pixeldrain whenever a captcha is required.
At this moment the wait time is hardcoded (5 minutes) whenever a captcha is needed but you prefer to wait.

Screenshot of the new setting (you will get that with our next set of CORE-updates):


Bitte auf das nächste CORE-Update warten!

Please wait for the next CORE-Update!

Wartest du auf einen angekündigten Bugfix oder ein neues Feature?
Updates werden nicht immer sofort bereitgestellt!
Bitte lies unser **External links are only visible to Support Staff**...! | Please read our **External links are only visible to Support Staff**...!

---
Are you waiting for recently announced changes to get released?
Updates to not necessarily get released immediately!
Bitte lies unser **External links are only visible to Support Staff**...! | Please read our **External links are only visible to Support Staff**...!


-psp-
Is there something like alpha/beta version of JD? Or normal users are only able to use stable version?

Off-topic: I have a bit of OCD, I just would like to suggest about your lines of update, you put "please read our faq" in english and deutsch in both, would be better if you put the english one only in the english paragraph and the deutsch one only in the deutsch paragraph..
Reply With Quote
  #2552  
Old 09.02.2023, 17:43
Leonfake Leonfake is offline
Junior Loader
 
Join Date: Aug 2020
Posts: 10
Default

Quote:
Originally Posted by Leonfake View Post
Hello! Sorry for taking long to reply, I was a bit away from PC this weekend.

About the question, I think yes, but, also there is some files which ask for captcha because they say them have "unsual traffic", but, if you have a lot of files from Pixeldrain in queue, and one asks for captcha, the other ones will start to ask too.

There is another thing, when I'm starting them manually, and a file asks for captcha, so I go to another after a few time, it starts normally. But if JD does that, he does very fast, and then maybe the Pixeldrain detect suspicious action, starting to ask captcha for all files.

I don't know if after a certain time it resets, I was using a VPN to change IP everytime it started to ask captcha for all files.



Is there something like alpha/beta version of JD? Or normal users are only able to use stable version?

Off-topic: I have a bit of OCD, I just would like to suggest about your lines of update, you put "please read our faq" in english and deutsch in both, would be better if you put the english one only in the english paragraph and the deutsch one only in the deutsch paragraph..
Hahaha accidentally found the answer, I'm studying Java, so I just found the "Setup IDE Eclipse" article and now I have the latest build
Reply With Quote
  #2553  
Old 10.02.2023, 19:55
Alexpark24 Alexpark24 is offline
Junior Loader
 
Join Date: Jan 2023
Posts: 13
Default

Hello,
Is there any Script that renames the files to be downloaded and names them the title of the page?
In my case, I download videos from pages and it's sometimes confusing since it comes with the name of the video file that was uploaded to that page by default, so it doesn't even come with the name of the video or anything similar, that complicates searching for it after downloading it.

Last edited by Alexpark24; 10.02.2023 at 19:57.
Reply With Quote
  #2554  
Old 13.02.2023, 13:37
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 73,118
Default

Quote:
Originally Posted by Leonfake View Post
About the question, I think yes, but, also there is some files which ask for captcha because they say them have "unsual traffic", but, if you have a lot of files from Pixeldrain in queue, and one asks for captcha, the other ones will start to ask too.
...
There is another thing, when I'm starting them manually, and a file asks for captcha, so I go to another after a few time, it starts normally. But if JD does that, he does very fast, and then maybe the Pixeldrain detect suspicious action, starting to ask captcha for all files.
I haven't looked depeper into that yet.
Please try my changes first and then feel free to provide feedback to further improve that.

Quote:
Originally Posted by Leonfake View Post
Is there something like alpha/beta version of JD? Or normal users are only able to use stable version?
Only stable + dev version.

Quote:
Originally Posted by Leonfake View Post
Off-topic: I have a bit of OCD, I just would like to suggest about your lines of update, you put "please read our faq" in english and deutsch in both, would be better if you put the english one only in the english paragraph and the deutsch one only in the deutsch paragraph
Sorry but that would slow down my workflow so I'm not going to do that.
Apart from this small thing though I'm always open for feedback.

Quote:
Originally Posted by Leonfake View Post
Hahaha accidentally found the answer, I'm studying Java, so I just found the "Setup IDE Eclipse" article and now I have the latest build
I was just about to answer that though I wouldn't consider that a "beta version".

Feel free to rpovide early feedback to my changes.
__________________
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
  #2555  
Old 14.02.2023, 13:35
Dockel Dockel is offline
JD Legend
 
Join Date: Feb 2020
Posts: 700
Default Script that automatically resumes all the links in downloadlist?

A script that automatically resumes / continues (called "Fortsetzen" in German) all of the links in the download list every minute, 5 min., 10 min. (or in a user defined time) would be great.

__________________
Aktuelles Windows

Last edited by Dockel; 14.02.2023 at 13:50.
Reply With Quote
  #2556  
Old 20.02.2023, 18:39
Alexpark24 Alexpark24 is offline
Junior Loader
 
Join Date: Jan 2023
Posts: 13
Default Packagizer Hook

Quote:
Originally Posted by mgpai View Post
Code:
// Rename files by matching download url pattern
// Trigger: Packagizer Hook

if (state == "BEFORE") {
    var patt = /.+\/domain\.com\/(foo)\/(bar)(\.zip)/i;
    var name = link.getURL().match(patt);
    if (name) link.setName(name[2] + "_" + name[1] + name[3]);
}

Packagizer rules not suitable for this?
What do I need to change so that the title of the url is the name of the file to download? I download videos, I added the script and I have it activated but it does not rename the videos...
Reply With Quote
  #2557  
Old 20.02.2023, 18:43
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 73,118
Default

@Alexpark24
Context please:
- Which links are you trying to download?
- Which filenames do you get now?
- How would your desired filenames look like? [Please provide examples]
__________________
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
  #2558  
Old 20.02.2023, 19:04
Alexpark24 Alexpark24 is offline
Junior Loader
 
Join Date: Jan 2023
Posts: 13
Default

Quote:
Originally Posted by pspzockerscene View Post
@Alexpark24
Context please:
- Which links are you trying to download?
- Which filenames do you get now?
- How would your desired filenames look like? [Please provide examples]
Hello good,
1) links to anime pages (the videos on those pages to be exact) I do a deep analysis and jdownloader brings me the video files directly example link: **External links are only visible to Support Staff**..., After the analysis it leaves me several video files named like this: 7inspectre.mp4 with link of :**External links are only visible to Support Staff**...

2) and what I wanted was for the script to rename it and it would look like this: Kyokou Suiri Season 2 episodio 7 — MonosChinos.mp4, that name is the title of the page.

3)of course I have several pages from which to do analysis to download the videos:
**External links are only visible to Support Staff**...
**External links are only visible to Support Staff**...
**External links are only visible to Support Staff**...
**External links are only visible to Support Staff**...
**External links are only visible to Support Staff**...
**External links are only visible to Support Staff**...

I think I have given you the information you need.
anyway and in advance thank you very much for paying attention and helping me.;)
Reply With Quote
  #2559  
Old 20.02.2023, 19:07
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 73,118
Default

I can't help you with the script but to be able to rename those files accordingly, JD has to obtain the "better"/"real" title from somewhere and it doesn't have access to that html code so the only possible source is the source-URL.
Does that contain the title?

About all links in your recent reply:
They've been eaten by a rare forum bug.
Please either re-post them or put them into a .txt file and attach that to your next reply so that I can see them.
EDIT

To sum this up:
Either way I don't think that script will help you.
I think you got false expectations on what that script is doing.
__________________
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
  #2560  
Old 23.02.2023, 00:46
Nimboid Nimboid is offline
Vacuum Cleaner
 
Join Date: Jan 2023
Location: UK
Posts: 18
Default Mixcloud.com Packagizer Puzzle - Inconsistency or Incomprehension?

Getting tired of editing filenames of topic-related links from Mixcloud, I've written an Event Script, which normalises the commonly encountered variations to what I want. That part is actually working fine, but while I was at it, I thought I might as well influence the package name too, by checking it matches my preferred format, or perhaps by parsing and expanding a #abbreviation_tag. Here I have encountered behaviour I don't understand, related to interaction between the 'Information overwrites packagizer rules' checkbox found on the 'Analyse and Add Links' dialog, and the script. Script and screenshots follow:

Code:
//FHK 2023 02 19 - Normalise spelling/capitalisation of PoTP file captures from Mixcloud
// Trigger required: Packagizer Hook

String.prototype.includes = function(str2) {
    return this.indexOf(str2) > -1;
}
var packLink = link;
var inPack;
var inHost;
var inName;
var outName;
var outPack;
var subst;
var regex;

var inPack = packLink.getPackageName();
alert(state + " 1 inPack: " + inPack);

inHost = packLink.getHost();
if (inHost.includes("mixcloud.com")) {
    inName = packLink.getName();

    regex = new RegExp("(pick of the pops)|(potp)", 'gi')
    subst = "Pick of The Pops";
    outName = inName.replace(regex, subst);

    if (outName.includes(subst)) {
        packLink.setName(outName);

        if (inPack.includes("PoTP")) {
            // leave as-is
        } else {
            //alert(inPack + " does not include 'PoTP'");
            alert(state + " 2 Setting Package to 'PoTP '")
            packLink.setPackageName("PoTP ");

        }

    }
    outPack = packLink.getPackageName();
    alert(state + " 3 Confirmed outPack set to: " + outPack);
}
Case 1:
**External links are only visible to Support Staff**

Above: Null Package name, checkbox unset.

Below: Script receives default Package name. Script sets new Package name as intended.
Nothing to argue about.

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

Case 2:
**External links are only visible to Support Staff**

Above: New Package name supplied, checkbox unset.

Below: Script receives default Package name, not user-supplied one. Where did 'wibble' go? Is there a method to access 'wibble', otherwise why is this field enabled in this situation?
Shouldn't script be given a chance to decide whether to use it to contribute to built-in packagizer rules?

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

Case 3:
**External links are only visible to Support Staff**

Above: Null Package name, checkbox set.

Below: Script receives default Package name. Script sets new Package name as intended.
Nothing to argue about.

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

Case 4:
**External links are only visible to Support Staff**

Above: New Package name supplied, checkbox set.

Below: Script does receive user-supplied Package name 'wibble'. Debug alert()s show Package name is changed by script - and read back as confirmation.
When Packagizer state is 'AFTER', Package name is still read as what the script set on the "BEFORE" pass. But the main LinkGrabber pane shows that the Package name set in reality is 'wibble', despite twice having read back a different value during the script's 2 passes. If this is intended behaviour, perhaps the PackageName() method should return a status value to signal success or failure reason?

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

As things stand, my script either (case 2) has the ability to change the package name, but is unable to receive input from the user to influence its behaviour, or (case 4) it is able to receive user input, is able to manipulate that information, but is prevented from applying any modification. This seems over-restrictive to me.

Test link:
<**External links are only visible to Support Staff****External links are only visible to Support Staff**[0]=AT3eXG8WEU6WO5zKysBFAXRpf0zFCNOEAF2ZrUHaXeDB9rYFAAdpkQldG41VxqWYguzbB_gOTxHoljswA5SJm46su_W6GxhxRrJ OLGpbwoWuuWRfJd_5Pj6_YB7oijkjZkXx21a4UoP8hfD0HOJxYlLfb9Pw1XbBbO5TQ6QwuPeef3OCsvoZRm6Qvd21n-HUldG84FQUPgDYPu8Q937UoDU>

PS, What processes happen between "BEFORE" and "AFTER" in a Packager Hook script?

Last edited by Nimboid; 23.02.2023 at 02:27. Reason: Added Test Link
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 08:49.
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.