JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1841  
Old 24.08.2021, 15:51
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,484
Default

Quote:
Originally Posted by Tomrich View Post
Hi,

i've tried this script to update jdownloader (headless on my raspberry pi) when there is nothing to to. i'm not sure its working correctly. whats the "interval" settings? is this the time jdownloader is waiting after the last download finished?

i can see "60 * 60 * 1000" in the script. if this is in milliseconds the time jdownloader waits should be 60min. if this is correct jdownloader should be updated every night. but the last 2 days i hade update notification at the morning. is there a log file where i can check whether jdownloader was updated?
Can you provide a link to the script which you are using?
Reply With Quote
  #1842  
Old 24.08.2021, 16:23
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,044
Default

@Tomrich: It's always good to reference what script you are talking about! You can find update logs in logs/updatehistory subfolder. You can also check MyJDownloader webinterface, settings tab, it will show the uptime of current JDownloader session
__________________
JD-Dev & Server-Admin
Reply With Quote
  #1843  
Old 24.08.2021, 21:24
stw500 stw500 is offline
Modem User
 
Join Date: Aug 2021
Posts: 4
Default

The first scipt (convert to mp3) works like a charm. But I would like to change the output bitrate for the mp3 to 256 variabel. How?
Reply With Quote
  #1844  
Old 24.08.2021, 22:24
Tomrich Tomrich is offline
DSL Light User
 
Join Date: Aug 2020
Posts: 30
Default

i mean this script https://support.jdownloader.org/Know...ate-jd-in-idle
Reply With Quote
  #1845  
Old 25.08.2021, 07:26
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,484
Default

Quote:
Originally Posted by stw500 View Post
... I would like to change the output bitrate for the mp3 to 256 variabel. How?
You can use this script. In the code, replace "320K" with "256K".
Reply With Quote
  #1846  
Old 25.08.2021, 07:48
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,484
Default

The script, at regular intervals (default 600000ms) will check if update is available and apply it, if either JD is idle or 'x' hours have elapsed since the last update (disabled by default, when hours = 0).

Quote:
Originally Posted by Tomrich View Post
...whats the "interval" settings? is this the time jdownloader is waiting after the last download finished?
Interval at which the script will check if update is available and apply it if JD is idle, or 'x' hours have elapsed.

Quote:
Originally Posted by Tomrich View Post
i can see "60 * 60 * 1000" in the script. if this is in milliseconds the time jdownloader waits should be 60min.
That is used only to calculate the elapsed hours.

So, if the script from that link is used without any modification, it will run every 10 mins. to check if update is available and restart and apply it, only if JD is idle.
Reply With Quote
  #1847  
Old 25.08.2021, 12:09
stw500 stw500 is offline
Modem User
 
Join Date: Aug 2021
Posts: 4
Default

Quote:
Originally Posted by mgpai View Post
You can use **External links are only visible to Support Staff**... script. In the code, replace "320K" with "256K".
Great! Have many thx, works wonderful.

Does anybody has a suggestion which mp3 bitrate is equal to the 128kbit m4a from youtube?
Reply With Quote
  #1848  
Old 25.08.2021, 12:21
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,044
Default

@stw500: you will always loose quality when converting again to mp3. why convert? nearly any player/device can play m4a or even ogg?
__________________
JD-Dev & Server-Admin
Reply With Quote
  #1849  
Old 25.08.2021, 14:59
stw500 stw500 is offline
Modem User
 
Join Date: Aug 2021
Posts: 4
Default

Quote:
Originally Posted by Jiaz View Post
@stw500: you will always loose quality when converting again to mp3. why convert? nearly any player/device can play m4a or even ogg?
Yes, I realize that basically there will always be some loss of quality when converting within or to lossy formats. However, there are various players, e.g. also built-in car radios, which can only process MP3. Furthermore, even a lossy M4A file with 128kbit is qualitatively far superior to a 128kbit MP3 file. So a conversion to e.g. 192, 256 or 320 kbit MP3 should result in only a very small loss of quality, which I would gladly accept because of the better compatibility. The only question is, how many kbit MP3 do I need for a roughly equivalent quality of 128kbit M4A.
Reply With Quote
  #1850  
Old 25.08.2021, 15:29
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,044
Default

@stw500: maybe this helps, tritondigitalcommunity.force.com/s/article/Choosing-Audio-Bitrate-Settings?language=en_US
__________________
JD-Dev & Server-Admin
Reply With Quote
  #1851  
Old 25.08.2021, 15:37
stw500 stw500 is offline
Modem User
 
Join Date: Aug 2021
Posts: 4
Default

Thank you very much, I had already searched myself but unfortunately couldn't find a specific comparison. The link also contains more of a general comparison. The claim there, 128kbit MP3 is suitable for high-quality music playback, but I consider it daring.
Reply With Quote
  #1852  
Old 25.08.2021, 15:42
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,044
Default

@stw500: In doubt I would go with vbr 320 if you have to rely on mp3 and still want the best of the best
__________________
JD-Dev & Server-Admin
Reply With Quote
  #1853  
Old 04.09.2021, 17:53
drikazz drikazz is offline
Modem User
 
Join Date: Sep 2021
Posts: 2
Default

Hi,

I run jdownloader2 and filebot-node with docker in 2 differents containers.
I would like to set up an Automated Media Center by calling the filebot-node task when a package is finished.

According to filebot help, there is 3 differents way to do this :
- called the task '/opt/filebot-node/task 0' in the filebot container.
- go to the link '**External links are only visible to Support Staff**
- make a 'curl "**External links are only visible to Support Staff**

I was thinking of creating a task with a PackageFinished trigger but, as far I'm a noob in js, I didn't find a way to call the filebot task (in the other container) in the event script..

Thank you in advance for your help

Last edited by drikazz; 05.09.2021 at 12:57.
Reply With Quote
  #1854  
Old 06.09.2021, 17:56
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,044
Default

@drikazz: so you just have to trigger an URL and the other container will process a folder? right?
see (just example) how to create a browser instance and do a get request
https://board.jdownloader.org/showpo...postcount=1827
I'm sure if you need more help, mgpai will be able to help you
__________________
JD-Dev & Server-Admin
Reply With Quote
  #1855  
Old 07.09.2021, 20:03
bitbotzgames bitbotzgames is offline
Modem User
 
Join Date: Sep 2021
Posts: 2
Talking BeautifyFileName.js

Code:
// Makes file names of added links more readable, especally videos
// If you grab a file like:
// This.Is.A,Naming.Scheme.S02E03.German.Subbed.720p.WEB.h264-ZZZ
// it gets converted to:
// This Is A Naming Scheme S02E03
// Trigger Required: A new link has been added

// Change to your language
var yourLanguage = "German";

try {
	var linkName = link.getName();
    
    if (linkName !== null) {
        // extract extension
        var extension = (linkName.match(/\.([^.]*?)(?=\?|#|$)/) || [])[1];
            
        // Replace dots with spaces
        linkName = linkName.split('.').join(' ');

        // remove extension
        linkName = linkName.substring(0, linkName.length - extension.length);

        linkName = linkName.split(yourLanguage.toLowerCase())[0];
        linkName = linkName.split(yourLanguage)[0];
        linkName = linkName.split(yourLanguage.toUpperCase())[0];

        // Remove space at end if present
        if (linkName.slice(-1) == " ") {
            linkName = linkName.substring(0, linkName.length - 1);
        }

        link.setName(linkName + "." + extension);
    }
    
} catch(error) {
    // Quiet crash
}
Github link:
Code:
github.com/bitbotzgames/jdownloader-eventscripter/blob/main/BeautifyFileName.js

Last edited by bitbotzgames; 09.09.2021 at 20:42. Reason: Github link added
Reply With Quote
  #1856  
Old 08.09.2021, 10:41
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,044
Default

@bitbotzgames: thanks for sharing the script! can you please repost your github link?
__________________
JD-Dev & Server-Admin
Reply With Quote
  #1857  
Old 08.09.2021, 16:27
drikazz drikazz is offline
Modem User
 
Join Date: Sep 2021
Posts: 2
Default

Quote:
Originally Posted by Jiaz View Post
@drikazz: so you just have to trigger an URL and the other container will process a folder? right?
see (just example) how to create a browser instance and do a get request
**External links are only visible to Support Staff**...
I'm sure if you need more help, mgpai will be able to help you
Thx !
I tried this script but it doesn't work.
I have the feeling that it is more complicated than replacing the 1.1.1.1 with my URL.

Quote:
Originally Posted by bitbotzgames View Post
Code:
// Makes file names of added links more readable, especally videos
// If you grab a file like:
// This.Is.A,Naming.Scheme.S02E03.German.Subbed.720p.WEB.h264-ZZZ
// it gets converted to:
// This Is A Naming Scheme S02E03
// Trigger Required: A new link has been added

// Change to your language
var yourLanguage = "German";

try {
	var linkName = link.getName();
    
    if (linkName !== null) {
        // extract extension
        var extension = (linkName.match(/\.([^.]*?)(?=\?|#|$)/) || [])[1];
            
        // Replace dots with spaces
        linkName = linkName.split('.').join(' ');

        // remove extension
        linkName = linkName.substring(0, linkName.length - extension.length);

        linkName = linkName.split(yourLanguage.toLowerCase())[0];
        linkName = linkName.split(yourLanguage)[0];
        linkName = linkName.split(yourLanguage.toUpperCase())[0];

        // Remove space at end if present
        if (linkName.slice(-1) == " ") {
            linkName = linkName.substring(0, linkName.length - 1);
        }

        link.setName(linkName + "." + extension);
    }
    
} catch(error) {
    // Quiet crash
}
Thanks for searching this script, it looks like a solution to do without filebot.
I would prefer to use filebot anyway because it's not just simple renaming but I'll keep your script as an alternative solution.
Reply With Quote
  #1858  
Old 08.09.2021, 16:31
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,484
Default

Quote:
Originally Posted by drikazz View Post
Thx !
I tried this script but it doesn't work.
I have the feeling that it is more complicated than replacing the 1.1.1.1 with my URL.
You can use callSync/callAsync method to run the terminal command in eventscripter OR use the getPage method to make a http request to your url.

If you need help implementing either of those solutions, you can find me in JD Chat.

Code:
kiwiirc.com/nextclient/irc.libera.chat/#jdownloader
Reply With Quote
  #1859  
Old 09.09.2021, 20:40
bitbotzgames bitbotzgames is offline
Modem User
 
Join Date: Sep 2021
Posts: 2
Default

Quote:
Originally Posted by Jiaz View Post
@bitbotzgames: thanks for sharing the script! can you please repost your github link?
Code:
github.com/bitbotzgames/jdownloader-eventscripter/blob/main/BeautifyFileName.js
Reply With Quote
  #1860  
Old 10.09.2021, 15:40
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,044
Default

@bitbotzgames: Thanks!
__________________
JD-Dev & Server-Admin
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:53.
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 - 2023, Jelsoft Enterprises Ltd.