JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 23.10.2021, 21:39
dawebbreb dawebbreb is offline
Baby Loader
 
Join Date: Oct 2021
Posts: 8
Default Add Silent mode to the scheduler

Is it possible to add Silent mode to the scheduler?
Reply With Quote
  #2  
Old 25.10.2021, 13:39
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 72,936
Default

@dawebbreb
You mean to enable/disable the silent mode?
You know that you can also script stuff via Eventscripter that is more powerful/flexibel than the scheduler?
__________________
JD-Dev & Server-Admin
Reply With Quote
  #3  
Old 26.10.2021, 00:36
dawebbreb dawebbreb is offline
Baby Loader
 
Join Date: Oct 2021
Posts: 8
Default

@Jiaz
Yes, I want to be able to toggle it on/off during night time.
I'm open to setting up a script as well if you can point me in the direction ��

The sound the captchas make at night wakes everyone up.

Last edited by dawebbreb; 26.10.2021 at 00:39.
Reply With Quote
  #4  
Old 26.10.2021, 11:53
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 72,936
Default

@dawebbreb:
You can disable the sound via Settings->Advanced Settings->SoundSettings.captchasoundenabled

For the script, see here https://board.jdownloader.org/showthread.php?t=70525
Basically it comes down to an interval script that checks time and then either enable/disable the captchasoundenabled property or silent mode.
Please ask mgpai in that thread for hint/help. He's our script master and I'm sure he will be able to provide a solution to you in no time

To be honest, I would prefer if you could find a solution that fits your needs via Eventscripter, because the scheduler extension is very limited in functionality and I don't see more work *wasted* on it because Eventscripter can achieve so much more
__________________
JD-Dev & Server-Admin

Last edited by Jiaz; 26.10.2021 at 11:56.
Reply With Quote
  #5  
Old 29.10.2021, 03:27
dawebbreb dawebbreb is offline
Baby Loader
 
Join Date: Oct 2021
Posts: 8
Default

For anyone interested, I was able to find an answer over at Scripts just like @Jiaz suggested. Thank you to @tb21 for providing the solution. Here it is:


//disable captcha sound at night
//Trigger "Interval"

var date = new Date();
var hours = date.getHours();

if (0);
else if (hours > 22 || hours <= 9) setCaptchaSoundEnabled( false);
else if (hours > 8) setCaptchaSoundEnabled( true);

function isCaptchaSoundEnabled() {
var key = "captchasoundenabled";
var interfaceName = "org.jdownloader.settings.SoundSettings";
var value = callAPI("config", "get", interfaceName, null, key); //bool
return value;
}
function setCaptchaSoundEnabled( truefalse) {
var key = "captchasoundenabled";
var interfaceName = "org.jdownloader.settings.SoundSettings";
var value = callAPI("config", "set", interfaceName, null, key, truefalse); //bool
return value;
}


Basically what it does is turn off the captcha sound after 2200 hours (Not AT 2200, but after. So in this case at 2300) and anytime before 0900. And then it will turn it back on AFTER 0800 (so 0900). This must be set as an interval script. I set mine to run every 15 mins.

You can modify the times as you please to make it work for your needs.

Last edited by dawebbreb; 29.10.2021 at 03:30.
Reply With Quote
  #6  
Old 29.10.2021, 11:10
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 72,936
Default

@dawebbreb: Thanks for sharing your script/solution
__________________
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 04:14.
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 - 2021, Jelsoft Enterprises Ltd.