#1
|
|||
|
|||
Add Silent mode to the scheduler
Is it possible to add Silent mode to the scheduler?
|
#2
|
||||
|
||||
@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 |
#3
|
|||
|
|||
@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; 25.10.2021 at 23:39. |
#4
|
||||
|
||||
@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 10:56. |
#5
|
|||
|
|||
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 02:30. |
#6
|
||||
|
||||
@dawebbreb: Thanks for sharing your script/solution
__________________
JD-Dev & Server-Admin |
Thread Tools | |
Display Modes | |
|
|