Jump to content

New Plugin: Emby.Notification.Slack


ackbarr
 Share

Recommended Posts

ThePaladinTech

It would be helpful to update the original post highlighting that the test button does not currently work. fussed with it for a while before I read through the thread to see that was the problem. Plugin works great! thank you for making it!

Link to comment
Share on other sites

one thing i noticed is that when i restart my chat application (rocket.chat) i have to restart emby afterwards so its "connected again" I don't know why this is.

Link to comment
Share on other sites

I'll take a look, but I don't see any reason that would be the case. The plugin doesn't maintain a connection to the server between messages, it attempts to connect each time. Is there anything in the logs when it is unable to connect?

Link to comment
Share on other sites

  • 1 month later...
george.carstoiu

Hey guys!

Used this plugin and everything worked as a charm until I had to reset my emby server, and also the plugin. Now I can seem to receive any notification anymore. I tried creating a new user, a new webhook instead of using the old one, changing the slack channel.

I then looked at the logs and saw this:

2017-10-31 19:00:56.782 Error NotificationManager: Error sending notification to Slack Notifications
    *** Error Report ***
    Version: 3.2.35.0
    Command line: /usr/lib/emby-server/bin/MediaBrowser.Server.Mono.exe -programdata /var/lib/emby-server -restartpath /usr/lib/emby-server/restart.sh
    Operating system: Unix 4.9.52.7
    64-Bit OS: False
    64-Bit Process: False
    User Interactive: False
    Mono: 5.4.0.201 (tarball Fri Oct 13 22:54:38 UTC 2017)
    Processor count: 4
    Program data path: /var/lib/emby-server
    Application directory: /usr/lib/emby-server/bin
    System.MissingMethodException: Method 'MediaBrowser.Common.Net.IHttpClient.Post' not found.
     at Emby.Server.Implementations.Notifications.NotificationManager+<SendNotification>c__async0.MoveNext () [0x000cd] in <28c4db19d80b4400be3b6f4675adb44f>:0
    System.MissingMethodException
     at Emby.Server.Implementations.Notifications.NotificationManager+<SendNotification>c__async0.MoveNext () [0x000cd] in <28c4db19d80b4400be3b6f4675adb44f>:0

 

 

Any kind of help would be appreciated as I really like the slack integration this plugin brings. Thanks!

Link to comment
Share on other sites

I'll take a look - I found a similar bug report for the TuneIn plugin and according to Luke it needed a change to the plugin to fix. I'm guessing 3.2.35.0 introduces a change that broke the plugin.

 

https://emby.media/community/index.php?/topic/52395-tunein-plugin-broken/

 

Yea sorry, the previous api returns the response stream, which you can dispose but it leave the original http response open. So you need to use a method that gives you a response object so that you can put that in a using block to make sure it gets disposed.

Link to comment
Share on other sites

Thanks for the explanation, that will save me a bunch of time. I had planned on digging through the TuneIn plugin tonight to figure out needed to change.

Link to comment
Share on other sites

Maybe the fact that you can get the notification plugin in the plugin catalog is also an issue. The whole reason I added the Services tab under Notifications was to allow you to stay within the Notifications section of the server dashboard. So if you're getting the plugin from Services, then you've probably already seen the rest.

Has it been removed from the catalog? It doesn't appear under Notifications => Catalog

Link to comment
Share on other sites

It was never added to the catalog. Currently the only way to get it is via the links in the first post in this thread. Once I fix the breakage after upgrading to 3.2.35.0 I'll go through the process to add it to the catalog.

Edited by ackbarr
Link to comment
Share on other sites

Just a quick update - I'm prepping a new version of the slack plugin that fixes the Test Notification bug, works with .NET core and the latest emby-server.  The last thing I need to figure out is why my plugin config page is not loading after I switched to framework 1.3.

  • Like 2
Link to comment
Share on other sites

george.carstoiu

I can also confirm that it works with Slack. The test button still shows the error, but the notification is sent. Tried also, playback start, playback stop and everything works as expected.

Thank you @@ackbarr for the fast fix!

Link to comment
Share on other sites

I can also confirm that it works with Slack. The test button still shows the error, but the notification is sent. Tried also, playback start, playback stop and everything works as expected.

 

Thank you @@ackbarr for the fast fix!

 

George - could you send me a log that includes the error you receive when hitting the test button?  The 1.0.2 build above should fix that.

Link to comment
Share on other sites

george.carstoiu

Went through the logs and it was because I had an old webhook in the configuration xml, which I had removed in the meantime from Slack. Removed it from the xml and it is fine now, no more error with test button either.

Also as a bonus, I updated the emby-server to Version 3.2.36.0 and plugin is working without any problems.

  • Like 1
Link to comment
Share on other sites

This plugin has officially been added to the plugin catalog and releases will now be done via the catalog management.

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

Hey @@ackbarr

I'm using the plugin for rocket.chat with the webhook script you provided for new content notifications.

It works fine except one problem: When the title contains an

&

an empty message is being received.

I'm not sure whether this is a problem of your script or rocket.chat itself, maybe you can tell me?

 

Thank you very much and best regards

Link to comment
Share on other sites

Hey @@ackbarr

I'm using the plugin for rocket.chat with the webhook script you provided for new content notifications.

It works fine except one problem: When the title contains an

&

an empty message is being received.

I'm not sure whether this is a problem of your script or rocket.chat itself, maybe you can tell me?

 

Thank you very much and best regards

 

My guess is the '&' character needs to be escaped in the script somehow, but I haven't found anything in the rocket.chat documentation that discusses character escaping. I'll research a bit further, but I may have to set up a rocket.chat server again and play with it.

Edited by ackbarr
  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Hi, 

Can you add the possibility to edit the notification message?

I would like to add an image like I do in omby when I post a notification on my slack channel : 

 

 

{PosterImage} The request by {RequestedUser} for {Title} is available

  • Like 1
Link to comment
Share on other sites

Catching up on a few recent posts:

 

horstepipe: I haven't had a chance to setup rocket.chat again to play with the webhook script. Are you still fighting the '&' escaping issue?

 

hello

 

tested on synology cat works flawless

 

can you join the film jacket with?

pikeupe: Sorry I'm not sure what you are requesting here. Could you tell me more about film jacket?

 

Hi, 

Can you add the possibility to edit the notification message?

I would like to add an image like I do in omby when I post a notification on my slack channel : 

kesm: The Slack plugin depends on Emby's notification manager (Expert -> Notifications) to determine the message sent to the slack channel. The benefit is that the plugin can listen for any notification triggered by Emby, but has the drawback that it is limited to the template variables provided by the Emby core. Your best bet is to make a feature request in the Emby core project to add the template variables you desire for the event(s) in question. That way all notification plugins benefit from the improvement. Currently, I am not interested in creating a new templating engine to replace the features in the Emby core.

 

I am familar with Ombi, but never used it, as I think my plugin and Ombi are designed for similar but distinct use cases. Now that it has Emby support, there is always the option to use it instead of my plugin to have a visually rich notification.

Link to comment
Share on other sites

  • 10 months later...

Hi, 

 

Can you add the possibility to edit the notification message?

 

 

Hey @@Luke

 

Any chance to have something about this for the notification?

 

I would like to use the metadata inestead of the filename.

 

Right now I'm receiving like this The Neighborhood - The.Neighborhood.S01E10.HDTV.x264 has been added to your media library

 

I would like to have something like

 

The Neighborhood - Season 01, Eposide 10, Wlecome to the Stolen Sneakers

Link to comment
Share on other sites

Hmm I think it's because the notification is happening before the metadata has been fetched. We'll have to look at the timing of that. Thanks.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...