JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 31.01.2014, 01:08
roundsquare roundsquare is offline
Wind Gust
 
Join Date: Aug 2012
Location: London
Posts: 40
Default Mac Notification Center Integration

Hi Guys,

Is it possible to implement this? It would be nice, and this should be easier than messing with the non-working growl for years now.

Cheers

Last edited by roundsquare; 04.02.2014 at 15:06.
Reply With Quote
  #2  
Old 04.02.2014, 14:59
roundsquare roundsquare is offline
Wind Gust
 
Join Date: Aug 2012
Location: London
Posts: 40
Default

Any reply?
Reply With Quote
  #3  
Old 04.02.2014, 22:07
thecoder2012's Avatar
thecoder2012 thecoder2012 is offline
Official 9kw.eu Support
 
Join Date: Feb 2013
Location: Internet
Posts: 1,318
Default

Can you post technical details for mac notification center with java?
__________________
Join 9kw.eu Captcha Service now and let your JD continue downloads while you sleep.
Reply With Quote
  #4  
Old 23.02.2014, 21:02
rafita
Guest
 
Posts: n/a
Arrow

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

Github page of "wokier / java-to-OS-notify"

Only requires Terminal Notifier to Install with 'brew install terminal-notifier' and Mountain Lion or higher


Thanks!
Reply With Quote
  #5  
Old 28.02.2014, 12:23
rafita
Guest
 
Posts: n/a
Default

Anything?
Reply With Quote
  #6  
Old 01.03.2014, 17:26
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 64,016
Default

Ticket:


GreeZ psp
__________________
JD Supporter, Plugin Dev. & Community Manager
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?
That's true James
Quote:
Originally Posted by James
Die Leute verstehen einfach nicht dass nur weil man mit einer Waffe auch auf Menschen schießen kann dass ein Schützenver​ein kein Ort für Amoklaufide​en ist
Reply With Quote
  #7  
Old 03.03.2014, 14:01
rafita
Guest
 
Posts: n/a
Default

Thank you so much!
Reply With Quote
  #8  
Old 14.12.2014, 22:08
coalado's Avatar
coalado coalado is offline
JD Manager
 
Join Date: Feb 2009
Posts: 1,985
Default

And What events should we notify?
__________________
Reply With Quote
  #9  
Old 25.05.2015, 22:09
roundsquare roundsquare is offline
Wind Gust
 
Join Date: Aug 2012
Location: London
Posts: 40
Default

Ah, glad to see some activity!
The usual important events, like download file; archive; folder finished, unpacked (download started isn't necessary imo).
Is there any chance to see it in the near future? I'm guessing it's not a big task to implement it, isn't it?

Last edited by roundsquare; 25.05.2015 at 22:17.
Reply With Quote
  #10  
Old 26.09.2015, 09:57
roundsquare roundsquare is offline
Wind Gust
 
Join Date: Aug 2012
Location: London
Posts: 40
Default

Is there any progress on the issue?
Reply With Quote
  #11  
Old 30.12.2015, 13:52
roundsquare roundsquare is offline
Wind Gust
 
Join Date: Aug 2012
Location: London
Posts: 40
Default

Anything?
Reply With Quote
  #12  
Old 03.01.2016, 12:40
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 78,379
Default

I've updated the ticket about how to "talk" to the notification center.
You can do all this yourself by using the Eventscripter extension and then call the notification center yourself. Please use board search about this topic
__________________
JD-Dev & Server-Admin
Reply With Quote
  #13  
Old 15.03.2017, 13:37
roundsquare roundsquare is offline
Wind Gust
 
Join Date: Aug 2012
Location: London
Posts: 40
Default

I managed to install terminal notifier with home brew, but after that I gave up, I'm completely untrained in programming.
Good luck for someone who understands it!

PS: I read also MacOS Script Editor can communicate with JavaScript:

Code:
var app = Application.currentApplication()
 
app.includeStandardAdditions = true
 
app.displayNotification("All graphics have been converted.", {
    withTitle: "My Graphic Processing Script",
    subtitle: "Processing is complete.",
    soundName: "Frog"
})
No idea what this does though, but it got complied in JD's Eventscripter, but unable to test run.

Last edited by roundsquare; 15.03.2017 at 13:43.
Reply With Quote
  #14  
Old 15.03.2017, 15:23
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 78,379
Default

I'm sorry but Javascript doesnt mean that you can use all Methods/Objects.
JDownloader doesn't know about Application.currentApplication. That only works in MacOS Script Editor.

does the terminal notifier work?
try in shell
__________________
JD-Dev & Server-Admin
Reply With Quote
  #15  
Old 20.03.2017, 14:21
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,484
Default

Quote:
Originally Posted by Jiaz View Post
does the terminal notifier work?
try in shell
@neoyoli,
If the 'terminal-notifier' is working correctly, you should be able to get notifications using this script.

Code:
// Notify download finished.
// Trigger: "A Download Stopped".
// OS: macOS 10.8 and higher.

if (link.isFinished()) {
    var notifier = "./terminal-notifier.app/Contents/MacOS/terminal-notifier"; // <- Set path to "terminal-notifier"
    var title = "JDownloader";
    var subtitle = "Download Finished";
    var message = link.getName();
    var sound = "default";

    callAsync(function() {}, notifier, "-title", title, "-subtitle", subtitle, "-message", message, "-sound", sound);
}

Last edited by Jiaz; 21.03.2017 at 10:55.
Reply With Quote
  #16  
Old 21.03.2017, 10:42
roundsquare roundsquare is offline
Wind Gust
 
Join Date: Aug 2012
Location: London
Posts: 40
Default

It gets compiled, but when a download is finished, I get this error message:

Quote:
Cannot run program "notifier": error=2, No such file or directory

java.io.IOException: Cannot run program "notifier": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:127)
at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:113)
at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:108)
at org.appwork.utils.processes.ProcessBuilderFactory.runCommand(ProcessBuilderFactory.java:56)
at org.jdownloader.extensions.eventscripter.sandboxobjects.ScriptEnvironment$2.run(ScriptEnvironment.ja va:185)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
... 5 more
Reply With Quote
  #17  
Old 21.03.2017, 10:54
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,484
Default

The error indicates JD is unable to locate "terminal-notifier". Please modify the following variable in the script to set the correct path.
Code:
var notifier = "./terminal-notifier.app/Contents/MacOS/terminal-notifier"; // <- Set path to "terminal-notifier"
Reply With Quote
  #18  
Old 21.03.2017, 10:55
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 78,379
Default

there is little misstake in script

callAsync(function() {}, "notifier", "-title", title, "-subtitle", subtitle, "-message", message, "-sound", sound);
must be
callAsync(function() {}, notifier, "-title", title, "-subtitle", subtitle, "-message", message, "-sound", sound);
__________________
JD-Dev & Server-Admin
Reply With Quote
  #19  
Old 21.03.2017, 11:00
mgpai mgpai is offline
Script Master
 
Join Date: Sep 2013
Posts: 1,484
Default

@Jiaz,

Yes, Thanks.

@neoyoli

Jiaz has made the necessary corrections. Please use the modified script. If you still get a similar error, check the path to 'terminal-notifier'.

Last edited by mgpai; 21.03.2017 at 11:05.
Reply With Quote
  #20  
Old 25.09.2022, 08:36
roundsquare roundsquare is offline
Wind Gust
 
Join Date: Aug 2012
Location: London
Posts: 40
Default

Hey guys, just want to report, that on MacOS Monterey, JDownloader is present in the Notification Centre, which certainly is a progress after these years, but no notifications trigger. Is there still hope for OS level notifications?

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 20:06.
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.