JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1981  
Old 02.11.2021, 20:42
Gbyte Gbyte is offline
I will play nice!
 
Join Date: Nov 2021
Posts: 4
Default

Quote:
Originally Posted by Jiaz View Post
@Gbyte: can you please be more specific? extraction path of? generic path? of a specific archive?
I mean this one. And sry, didnt know there were more ,:)
Attached Images
File Type: png f18a25a7.png (49.8 KB, 9 views)
Reply With Quote
  #1982  
Old 02.11.2021, 21:29
Marvel Marvel is offline
Baby Loader
 
Join Date: Oct 2021
Posts: 5
Default

@Jiaz dazu muss das ding dann im selben Netz sein oder gar ne Email geschickt werden,

mh wollte keine Weiteren Ports aufmachen oder ne Email schicken,

aber Event Messages noch nie benutzt (MYJdownloader Account nötig oder)

Aber schreib mal was du für gute Dienste kennts oder nutzt

Lieber wär mir,

Ja Ton Benachrichtigung, also ich hab Media human Konverter benutzt um zu konvertieren, aber ich denke das java das nicht abspielt.... habs aber nicht weiter eingrenzen können. weiss nur das es nichtgekalppt hat auch mit den einfacheren tönen in Mac OS Probiert hat kein tönchen ausgegeben..

würd mich interressieren wie das Bei WIN und co soo ist.... ob die das dort abspielen,
dann würd ich es mit dem selben Programmausprobieren, auf MAC OS

mhhh externen Audioplayer zum abspielen gern, aber wie das in das Script einbauen Quicktime-VLC nutzen wär klasse wenn das geht..,

denke wenn du das mal auf Win oder was auch immer mal ausprobieren könntest ob das abgespielt würd und was du zum konvertieren genutzt hast, wär das mal ein ansatz.
auch als ich wav file den selbennamen geben habe "Captcha".wav hat es das nicht abgespielt, auch gleichen Audio kbs werte übernommen hatte. hatte dafür MediaInfo genutzt um zu sehen was das für Audio werte sind um sie einzustellen.

Beim Rest Crash und Coo muss ich noch Nachsehen, ja der RAM speicher ist mit der Zeit schnell gefüllt, aber auch als ich einen Neuen JD aufegsetzt habe hat es nicht geholfen, könntest recht haben sind mehr als 2300 Files vorhanden

Das mit dem Timeout ist keine Schlechte Idee hab da was gefunde das die verbindung trennt... und wenn da JD Stoppt hätt ich einen Ton..... muss nachsehen wie ich das testen kann...

Gruss und Guten Abend auch

Update: hab VPN Verbindung bei inaktivität trennen gefunden, aber leider leider trennt es die Verbindung trotz Download , wird verbuggt sein. falls du noch einen anderen Workaround kennts, nur Zu..

Last edited by Marvel; 02.11.2021 at 23:26.
Reply With Quote
  #1983  
Old 03.11.2021, 08:58
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,379
Default

Quote:
Originally Posted by JDL1059 View Post
... using a text file and pasting the ... links there ... run a script to check that text file occasionally and import any new downloads.
Code:
/*
    Interval > Add urls
    Trigger : Interval (Recommended 3600000 or more)
*/

var file = "c:\\downloads\\urls.txt";// <- Set path to text file

try {
    var links = readFile(getPath(file));

    callAPI("linkgrabberv2", "addLinks", {
        links: links
    })
} catch (e) {};
Reply With Quote
  #1984  
Old 03.11.2021, 12:25
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,379
Default

Quote:
Originally Posted by Marvel View Post
... please explain witch Programm I need to convert a Sound in wav if mp3 not working.
You can just use ffplay from JD/tools folder to play audio files of any format:
Code:
callSync("path/to/ffplay", "path/to/audiofile", "-nodisp", "-autoexit");
Reply With Quote
  #1985  
Old 03.11.2021, 13:12
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 73,503
Default

@Gbyte:
Extraction.customextractionpathenabled
and
Extraction.customextractionpath
__________________
JD-Dev & Server-Admin
Reply With Quote
  #1986  
Old 03.11.2021, 13:15
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 73,503
Default

@Marvel: Du musst keinerlei Ports öffnen um irgendwelche Notification Dienste zu nutzen. Du sendest ja Requests weg und willst nicht einen Port aufmachen.
Und nein, das *Ding* muss nicht im selben Netz sein. Gibt doch genug Dienste/Apps die du aufm Computer/Handy installieren kannst und dann via API Events schicken kannst welche dann angezeigt werden.
Kurze Suche im Netz, zb
pushover.net
mobiloud.com/blog/best-push-notification-services
"ja der RAM speicher ist mit der Zeit schnell gefüllt" -> Nutzt du Mac 12? Da gibts aktuell nen Memleak Bug der nahezu alle Anwendungen betrifft. Dort musst auf MacOS Update warten.
Bzgl. VPN , evtl mal nen anderen Anbieter/oder Tool probieren? Sind ja meist offene/gleichen Protokolle, also könntest andere Clients nehmen
__________________
JD-Dev & Server-Admin
Reply With Quote
  #1987  
Old 03.11.2021, 15:53
mrjjones mrjjones is offline
Junior Loader
 
Join Date: Nov 2021
Posts: 14
Post Avoid duplicates at same path

I've been working on a script I asked about earlier to handle dealing with potential duplicates after changing the YouTube plugin Filename for Video files setting. The old setting was the default. The new setting has *CHANNEL* followed with Channel_.

*CHANNEL* Channel_*VIDEO_NAME* (*H*p_*FPS*fps_*VIDEO_CODEC*-*AUDIO_BITRATE*kbit_*AUDIO_CODEC*).*EXT*

Below is what I have so far. I now need to figure out (the commented non-code below) how to check if the old file exists and if it's within 5 MB of the new file (best guess it's the same file because of YouTube's file size variations). The trigger is on a download started. I think I'm getting closer and will keep at it, but any advice would be appreciated. Thanks!

Code:
var newFileName = link.getName();
var oldFileName = newFileName.substring(newFileName.indexOf("Channel_") + 8);

var folderPathOnly = link.package.downloadFolder;
var folderPathWithNewFile = link.getDownloadPath();
var folderPathWithOldFile = getPath(folderPathOnly + "/" + oldFileName);

//if folderPathWithOldFile already exists
//	if old file size within 5 MB of new file size
//		link.setEnabled(false);
//              (bonus: and rename old file to newFileName)
Reply With Quote
  #1988  
Old 03.11.2021, 16:40
mrjjones mrjjones is offline
Junior Loader
 
Join Date: Nov 2021
Posts: 14
Default

Quote:
Originally Posted by mrjjones View Post
I've been working on a script I asked about earlier to handle dealing with potential duplicates after changing the YouTube plugin Filename for Video files setting...
Okay, last reply for a while. I need a break. This stuff is hard for me. The only major part left is checking if the old and new file size is within 5 MB. I really have no idea where to start with that.

Code:
var newFileName = link.getName();
var oldFileName = newFileName.substring(newFileName.indexOf("Channel_") + 8);

var folderPathOnly = link.package.downloadFolder;
var folderPathWithNewFile = getPath(link.downloadPath);
var folderPathWithOldFile = getPath(folderPathOnly + "/" + oldFileName);
var folderPathWithOldFileExists = folderPathWithOldFile.exists();
var oldFileSize = folderPathWithOldFile.getSize();
var newFileSize = folderPathWithNewFile.getSize();

if (folderPathWithOldFileExists === true ) {
    link.setEnabled(false);
    link.setComment("OLD FILE EXISTS");
    package.setComment("OLD FILE EXISTS");
};


//	also above if condition: old file size within 5 MB of new file size
//		link.setEnabled(false);
//              (bonus: and rename old file to newFileName)
Reply With Quote
  #1989  
Old 03.11.2021, 17:00
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,379
Default

Quote:
Originally Posted by mrjjones View Post
...how to check if the old file exists and if it's within 5 MB of the new file ...
Code:
/*
    Dupe check
    Trigger: A download started
*/    

var old = getPath(link.downloadPath.replace(/(.+\\).+Channel_(.+)/, "$1$2"));

if (old.exists()) {
    var diff = Math.abs(link.bytesTotal - old.size);
    var target = 1024 * 1024 * 5;

    if (diff < target) {
        link.enabled = false;
        old.renameName(link.name);
    }
}
Reply With Quote
  #1990  
Old 03.11.2021, 20:17
mrjjones mrjjones is offline
Junior Loader
 
Join Date: Nov 2021
Posts: 14
Default

Quote:
Originally Posted by mgpai View Post
Code:
/*
    Dupe check
    Trigger: A download started
*/    

var old = getPath(link.downloadPath.replace(/(.+\\).+Channel_(.+)/, "$1$2"));

if (old.exists()) {
    var diff = Math.abs(link.bytesTotal - old.size);
    var target = 1024 * 1024 * 5;

    if (diff < target) {
        link.enabled = false;
        old.renameName(link.name);
    }
}

@mgpai this is absolutely perfect. Thank you so much.

I'm also going to add the *VIDEOID* for new files at the end of the name before the extension to further make them unique going forward. I just need to figure out how to change your var old line to also remove the VIDEOID at the end to check the old file.

*CHANNEL* Channel_*VIDEO_NAME* (*H*p_*FPS*fps_*VIDEO_CODEC*-*AUDIO_BITRATE*kbit_*AUDIO_CODEC*) ID_*VIDEOID*.*EXT*
Reply With Quote
  #1991  
Old 03.11.2021, 23:31
mrjjones mrjjones is offline
Junior Loader
 
Join Date: Nov 2021
Posts: 14
Default

Quote:
Originally Posted by mrjjones View Post
I'm also going to add the *VIDEOID* for new files..
Okay, got that set. Below is pretty much the final code. Thanks so much mgpai.

Trigger is on download started. YouTube plugin file name is:

*CHANNEL* Channel_*VIDEO_NAME* (*H*p_*FPS*fps_*VIDEO_CODEC*-*AUDIO_BITRATE*kbit_*AUDIO_CODEC*)_VidID*VIDEOID*IDEND.*EXT*

Code:
disablePermissionChecks();
var newFileName = link.getName();
package.setName(newFileName);

var oldFile = getPath(link.downloadPath
    .replace(/(.+\\).+Channel_(.+)/, "$1$2")
    .replace(/(_VidID)(.+)(IDEND)/, "")
    );

var newFileSize = link.getBytesTotal();
var oldFileSize = oldFile.getSize();

if (oldFile.exists()) {
    var diff = Math.abs(link.bytesTotal - oldFile.size);
    var target = 1024 * 1024 * 5;

    if (diff < target) {
        link.enabled = false;
        oldFile.renameName(link.name);
        link.setComment("Old file exists. Skipped and renamed. - Old/New size: " + oldFileSize + " / " + newFileSize);
        package.setComment("Old file exists. Skipped and renamed. - Old/New size: " + oldFileSize + " / " + newFileSize);
        alert("Old file exists. Skipped and renamed.\n\n" + oldFileSize + " (old size)\n" + "   " + oldFile + "\n\n" + newFileSize + " (new size)\n" + "   " + newFileName);
    }
}
I'm just now going to try and get the file sizes in the alerts to display in MB but I think mgpai has given me some clues. Thanks everyone for the help.
Reply With Quote
  #1992  
Old 04.11.2021, 11:44
reddy.shyam reddy.shyam is offline
Mega Loader
 
Join Date: Aug 2013
Posts: 69
Default

Hi guys,

Good day! Is there a way to display the trigger interval countdown on the status bar or something? Just want to have an idea when the trigger would run next time.
Reply With Quote
  #1993  
Old 04.11.2021, 15:04
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 73,503
Default

@reddy.shyam: Not yet possible/supported but I think it's a good feature request.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #1994  
Old 04.11.2021, 15:35
reddy.shyam reddy.shyam is offline
Mega Loader
 
Join Date: Aug 2013
Posts: 69
Default

Quote:
Originally Posted by Jiaz View Post
@reddy.shyam: Not yet possible/supported but I think it's a good feature request.
Hi @Jiaz,

Oh, Wow! Can't belive I am that smart to come up with ideas!

Thank you. Will follow up the request.
Reply With Quote
  #1995  
Old 04.11.2021, 15:38
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,379
Default

Quote:
Originally Posted by reddy.shyam View Post
Is there a way to display the trigger interval countdown on the status bar or something? Just want to have an idea when the trigger would run next time.
What kind of script? How often does it trgger?
Reply With Quote
  #1996  
Old 04.11.2021, 15:41
reddy.shyam reddy.shyam is offline
Mega Loader
 
Join Date: Aug 2013
Posts: 69
Default

Quote:
Originally Posted by mgpai View Post
What kind of script? How often does it trgger?
Hi @mgpai, the script to randomize the downloads which you helped me earlier with. At the moment running every 10 minutes but I would like to see when it would trigger next time please.
Reply With Quote
  #1997  
Old 04.11.2021, 16:14
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,379
Default

Quote:
Originally Posted by reddy.shyam View Post
... I would like to see when it would trigger next time please.
Add this code at the end of the existing script.
Code:
/*
    Append next execution time to script name
*/    

var name = "reddy.shyam"; // <- Set name of the script (case-sensitive)
var scripts = getScripts();

scripts.forEach(function(script, index) {
    try {
        if (script.name.indexOf(name) > -1) {
            var ets = script.eventTriggerSettings;
            var date = new Date(ets.lastFire + ets.interval).toString().substr(4, 20);

            scripts[index].name = name + " | Next execution: " + date;
        }
    } catch (e) {};
})

setScripts(scripts);

function getScripts() {
    return callAPI(
        "config", "get",
        "org.jdownloader.extensions.eventscripter.EventScripterConfig",
        "cfg/org.jdownloader.extensions.eventscripter.EventScripterExtension",
        "Scripts"
    );
}

function setScripts(scripts) {
    callAPI(
        "config", "set",
        "org.jdownloader.extensions.eventscripter.EventScripterConfig",
        "cfg/org.jdownloader.extensions.eventscripter.EventScripterExtension",
        "Scripts", scripts
    );
}
Reply With Quote
  #1998  
Old 04.11.2021, 16:22
reddy.shyam reddy.shyam is offline
Mega Loader
 
Join Date: Aug 2013
Posts: 69
Default

Quote:
Originally Posted by mgpai View Post
Add this code at the end of the existing script.
Code:
/*
    Append next execution time to script name
*/    

var name = "reddy.shyam"; // <- Set name of the script (case-sensitive)
var scripts = getScripts();

scripts.forEach(function(script, index) {
    try {
        if (script.name.indexOf(name) > -1) {
            var ets = script.eventTriggerSettings;
            var date = new Date(ets.lastFire + ets.interval).toString().substr(4, 20);

            scripts[index].name = name + " | Next execution: " + date;
        }
    } catch (e) {};
})

setScripts(scripts);

function getScripts() {
    return callAPI(
        "config", "get",
        "org.jdownloader.extensions.eventscripter.EventScripterConfig",
        "cfg/org.jdownloader.extensions.eventscripter.EventScripterExtension",
        "Scripts"
    );
}

function setScripts(scripts) {
    callAPI(
        "config", "set",
        "org.jdownloader.extensions.eventscripter.EventScripterConfig",
        "cfg/org.jdownloader.extensions.eventscripter.EventScripterExtension",
        "Scripts", scripts
    );
}
Oh, Wow! Thanks @mgpai. You are faster than light! I have set this and did a test run. It asked for permission which I allowed. Oh! I see it under event scripter along side name. Pretty good that one. Any chance to see it on status bar please otherwise I will have to goto settings to see the same?

Last edited by reddy.shyam; 04.11.2021 at 16:24.
Reply With Quote
  #1999  
Old 04.11.2021, 16:30
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,379
Default

Quote:
Originally Posted by reddy.shyam View Post
Can you tell me please?
It is currently configured to append the next execution time to the script name. Each time it is executed, the next execution time will be appended to the script name in the eventscripter panel.

If your current script name is reddy.shyam (you have to set the current name in the script), it will be renamed to reddy.shyam | Next execution: Nov 04 2021 15:46:59.
Reply With Quote
  #2000  
Old 04.11.2021, 16:34
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,379
Default

Quote:
Originally Posted by reddy.shyam View Post
Any chance to see it on status bar please otherwise I will have to goto settings to see the same?
You will have to wait for Jiaz to implement it. I can provide a script which can append it to the title bar.
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 04:57.
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 - 2022, Jelsoft Enterprises Ltd.