Jump to content

New Plugin: Discord Notifications


rechigo

Recommended Posts

The discord notification is misising the server name and I'm not sure why.  Example:

 

"I Am Legend (2007) has been added to"

1) When you go to your server Dashboard, what do you see for your server name?

bkj.png

 

2) If you uncheck "Replace "Emby Server" with your server name" from the configuration settings, do you see "Emby Server" as the server name when items are added?

 

 

Also, a request if I could... would it be possible to minimize the content of these notifications?  Meaning, I'd prefer to just have the "{title} has been added to {server}" and not include the synopsis and the links.

 

Yes, there is room for more customization in the future

Link to comment
Share on other sites

Whiskeyjack

1) When you go to your server Dashboard, what do you see for your server name?

bkj.png

 

2) If you uncheck "Replace "Emby Server" with your server name" from the configuration settings, do you see "Emby Server" as the server name when items are added?

 

 

 

Yes, there is room for more customization in the future

Hi,

 

Thanks for the quick reply.  The server name on the Dashboard is "Wu".  I disabled "Replace Emby Server with your server name" and it's still blank.

Link to comment
Share on other sites

I remember seeing your issue before in a post by another user (user didn't mention it, but it did catch my eye in the screenshot)

 

I haven't been able to reproduce this yet, but I have a pretty good idea of what might be going wrong here (something to do with translating the "x item has been added to y server" string, which obviously isn't working as shown by your screenshot)

 

Sent from my Galaxy S10

Edited by rechigo
Link to comment
Share on other sites

I just tested this and it works amazingly good.

Pretty easy to setup as well.

Thank you rechigo for all the effort put into it.

 

One question regarding Discord:
I have never used it before and am wondering if the channels created for this are completely private so that only invited persons can see it?

Is the communication in the channel somehow encrypted and secure?

 

@@Luke, @@ebr, when will we see this in the catalogue?

Edited by neik
Link to comment
Share on other sites

I just tested this and it works amazingly good.

Pretty easy to setup as well.

Thank you rechigo for all the effort put into it.

 

One question regarding Discord:

I have never used it before and am wondering if the channels created for this are completely private so that only invited persons can see it?

Is the communication in the channel somehow encrypted and secure?

 

@@Luke, @@ebr, when will we see this in the catalogue?

you can set up your own private discord and invite whoever you want or not. I use it for chatting with some emby people. I recently set up my own personal channel which is entirely independent of that for use with requestrr (if you are a sonarr or radarr user take a look at it, I love it!) very keen now to add a new channel within my private server to handle the notifications from this plug in. Like you I’m keen to see it in the catalogue
  • Like 2
Link to comment
Share on other sites

you can set up your own private discord and invite whoever you want or not. I use it for chatting with some emby people. I recently set up my own personal channel which is entirely independent of that for use with requestrr (if you are a sonarr or radarr user take a look at it, I love it!) very keen now to add a new channel within my private server to handle the notifications from this plug in. Like you I’m keen to see it in the catalogue

Don't use sonarr or radarr but saw it has integration with Ombi which I also wanted to test.

 

Thanks for the hint, sounds promising.

Link to comment
Share on other sites

you can set up your own private discord and invite whoever you want or not. I use it for chatting with some emby people. I recently set up my own personal channel which is entirely independent of that for use with requestrr (if you are a sonarr or radarr user take a look at it, I love it!) very keen now to add a new channel within my private server to handle the notifications from this plug in. Like you I’m keen to see it in the catalogue

Thanks for requestrr tip!!

Link to comment
Share on other sites

I just did some further testing and noticed that when a new season gets added one gets a notification for the season and for each episode in it.

In a big season like Pokemon or Dragon Ball seasons it can be around 100 notifications at once.

 

Would it be possible to work like this:

 

When a season is not available yet, only the season notification is sent out.

If a season already exists and a new episode gets added then the episode notification gets sent out.

 

If it's not clear what I mean, please let me know.

Link to comment
Share on other sites

Been setting this up, works pretty good so far, found a few couple bugs I think.  
 
Entering a URL for the avatar in the plugin settings causes the webhook to fail when I try to send a test notification.
Enabling "Seasons" under "Override the built in media added notification with a more extensive one" causes Emby to crash
 
I think it is intercepting notifications from Radarr? I have Radarr set to push notifications via "Emby Update" and it's posting both to discord.  I'll just remove that for now from Radarr.
 

I'm using Emby Server v4.4.2.0 and plugins v1.0.7.6

post-186110-0-74830800-1588130986_thumb.png

Edited by seriosbrad
Link to comment
Share on other sites

I just did some further testing and noticed that when a new season gets added one gets a notification for the season and for each episode in it.

In a big season like Pokemon or Dragon Ball seasons it can be around 100 notifications at once.

 

Would it be possible to work like this:

 

When a season is not available yet, only the season notification is sent out.

If a season already exists and a new episode gets added then the episode notification gets sent out.

 

If it's not clear what I mean, please let me know.

 

I've wanted to do this for both TV and Music Albums for a while now, I just haven't got to it yet. Due to the nature of how new item added events are delivered from Emby, it makes doing this reliably a difficult chore.

 

Entering a URL for the avatar in the plugin settings causes the webhook to fail when I try to send a test notification.

Enabling "Seasons" under "Override the built in media added notification with a more extensive one" causes Emby to crash

1) Are you prefixing the URL with http:// or https://? Discord is picky and will throw an error if you don't

2) Can't recreate with the same version, is there any additional information you can add to help narrow it down?

 

Sorry for the lack of updates recently, I've been too busy to test out new features lately

  • Like 1
Link to comment
Share on other sites

I've wanted to do this for both TV and Music Albums for a while now, I just haven't got to it yet. Due to the nature of how new item added events are delivered from Emby, it makes doing this reliably a difficult chore.

 

Looking forward to what you come up with to solve this. :-)

 

A generell question regarding Discord as such:

On my test setup I currently have everyone can see the member list and unfortunately I didn't find a setting to change this.

What I want: The users in it shouldn't be able to see each other on Discord, the only one they should see is the Admin user.

Does anyone know if that is possible?

If not, how to do guys handle it?

Edited by neik
Link to comment
Share on other sites

Looking forward to what you come up with to solve this. :-)

 

A generell question regarding Discord as such:

On my test setup I currently have everyone can see the member list and unfortunately I didn't find a setting to change this.

What I want: The users in it shouldn't be able to see each other on Discord, the only one they should see is the Admin user.

Does anyone know if that is possible?

If not, how to do guys handle it?

just create your own private discord
Link to comment
Share on other sites

Looking forward to what you come up with to solve this. :-)

 

A generell question regarding Discord as such:

On my test setup I currently have everyone can see the member list and unfortunately I didn't find a setting to change this.

What I want: The users in it shouldn't be able to see each other on Discord, the only one they should see is the Admin user.

Does anyone know if that is possible?

If not, how to do guys handle it?

 

 

just create your own private discord

 

He wants all of his discord users that are in a room, not to be able to see the user list, as in no user part of that discord server should know the other users exist..   I don't think you can do this without crippling the server...   If you dont want your users to interact with you or each other, you can use something similar to zapier and repost your discord alerts to a facebook page or something..   thats what I do.  

  • Like 1
Link to comment
Share on other sites

He wants all of his discord users that are in a room, not to be able to see the user list, as in no user part of that discord server should know the other users exist..   I don't think you can do this without crippling the server...   If you dont want your users to interact with you or each other, you can use something similar to zapier and repost your discord alerts to a facebook page or something..   thats what I do.  

i understand, i think :)

 

my suggestion was to create his own server. mine for requestrr

 

5eaae01a9e1ad_Capture.png

Link to comment
Share on other sites

Thanks for the addon it looks amazing!
I do have one problem which I can't figure out.

I'm currently getting the following error message when I past in the Webhook url of my discord channel.
 

The Discord Webhook URL appears to be invalid. Please try again with a valid URL

Error:

2020-04-30 19:16:32.947 Info HttpServer: HTTP Response 200 to 172.16.1.1. Time: 44ms. https://embyserver:8920/emby/System/Configuration
2020-04-30 19:16:33.396 Error Emby.Notifications.Discord: Failed to execute webhook: 
	*** Error Report ***
	Version: 4.4.2.0
	Command line: /usr/local/lib/emby-server/system/EmbyServer.exe -os freebsd -ffmpeg /usr/local/bin/ffmpeg -ffprobe /usr/local/bin/ffprobe -programdata /var/db/emby-server -updatepackage emby-server-freebsd_{version}_amd64.txz -noautorunwebapp
	Operating system: Unix 11.3.7.0
	64-Bit OS: True
	64-Bit Process: True
	User Interactive: False
	Mono: 5.10.1.57 (5.10.1.57 Thu Apr 23 10:45:16 UTC 2020)
	Runtime: file:///usr/local/lib/mono/4.5/mscorlib.dll
	System.Environment.Version: 4.0.30319.42000
	Processor count: 4
	Program data path: /var/db/emby-server
	Application directory: /usr/local/lib/emby-server/system
	System.MissingMethodException: System.MissingMethodException: bool System.Net.Logging.get_On()
	  at System.Net.Http.HttpMessageInvoker.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x00027] in <27bbdd4ceaf04a95b172ee502d76a725>:0 
	  at System.Net.Http.HttpClient.SendAsync (System.Net.Http.HttpRequestMessage request, System.Net.Http.HttpCompletionOption completionOption, System.Threading.CancellationToken cancellationToken) [0x0007a] in <27bbdd4ceaf04a95b172ee502d76a725>:0 
	  at System.Net.Http.HttpClient.SendAsync (System.Net.Http.HttpRequestMessage request) [0x00008] in <27bbdd4ceaf04a95b172ee502d76a725>:0 
	  at Emby.Notifications.Discord.DiscordWebhookHelper+<ExecuteWebhook>d__1.MoveNext () [0x00090] in <d8bd754d47b94ea1a3041ab17783dc71>:0 
	--- End of stack trace from previous location where exception was thrown ---
	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <0e06830de9a44394a7e366951eabca52>:0 
	  at Emby.Notifications.Discord.Notifier+<QueuedMessageSender>d__13.MoveNext () [0x000f1] in <d8bd754d47b94ea1a3041ab17783dc71>:0 
	Source: mscorlib
	TargetSite: Void Throw()
Edited by MoSquTo
Link to comment
Share on other sites

Thanks @@rechigo I'm loving the plugin.

 

Any chance of adding the option to allow posting to separate channels? For example I have 2 channels setup, #movies & #series so I would like to enter the webhooks for each channel so that the #movies channel gets the Movie updates and the #series channels gets the episode updates.

 

Thanks again..

Link to comment
Share on other sites

Thanks @@rechigo I'm loving the plugin.

 

Any chance of adding the option to allow posting to separate channels? For example I have 2 channels setup, #movies & #series so I would like to enter the webhooks for each channel so that the #movies channel gets the Movie updates and the #series channels gets the episode updates.

 

Thanks again..

Yes, but it's not an in your face option so you might have skipped over it:

 

Since there is a dropdown to select users on the plugin page, you can create a new user and configure that user to receive notifications in a different channel

 

Right now, that won't work for the media added notification for reasons I wont get in to, but it will be fixed in the next release

 

Sent from my Galaxy S10

Link to comment
Share on other sites

 

Thanks for the addon it looks amazing!

I do have one problem which I can't figure out.

 

I'm currently getting the following error message when I past in the Webhook url of my discord channel.

 

The Discord Webhook URL appears to be invalid. Please try again with a valid URL

Error:

2020-04-30 19:16:32.947 Info HttpServer: HTTP Response 200 to 172.16.1.1. Time: 44ms. https://embyserver:8920/emby/System/Configuration
2020-04-30 19:16:33.396 Error Emby.Notifications.Discord: Failed to execute webhook: 
	*** Error Report ***
	Version: 4.4.2.0
	Command line: /usr/local/lib/emby-server/system/EmbyServer.exe -os freebsd -ffmpeg /usr/local/bin/ffmpeg -ffprobe /usr/local/bin/ffprobe -programdata /var/db/emby-server -updatepackage emby-server-freebsd_{version}_amd64.txz -noautorunwebapp
	Operating system: Unix 11.3.7.0
	64-Bit OS: True
	64-Bit Process: True
	User Interactive: False
	Mono: 5.10.1.57 (5.10.1.57 Thu Apr 23 10:45:16 UTC 2020)
	Runtime: file:///usr/local/lib/mono/4.5/mscorlib.dll
	System.Environment.Version: 4.0.30319.42000
	Processor count: 4
	Program data path: /var/db/emby-server
	Application directory: /usr/local/lib/emby-server/system
	System.MissingMethodException: System.MissingMethodException: bool System.Net.Logging.get_On()
	  at System.Net.Http.HttpMessageInvoker.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x00027] in <27bbdd4ceaf04a95b172ee502d76a725>:0 
	  at System.Net.Http.HttpClient.SendAsync (System.Net.Http.HttpRequestMessage request, System.Net.Http.HttpCompletionOption completionOption, System.Threading.CancellationToken cancellationToken) [0x0007a] in <27bbdd4ceaf04a95b172ee502d76a725>:0 
	  at System.Net.Http.HttpClient.SendAsync (System.Net.Http.HttpRequestMessage request) [0x00008] in <27bbdd4ceaf04a95b172ee502d76a725>:0 
	  at Emby.Notifications.Discord.DiscordWebhookHelper+<ExecuteWebhook>d__1.MoveNext () [0x00090] in <d8bd754d47b94ea1a3041ab17783dc71>:0 
	--- End of stack trace from previous location where exception was thrown ---
	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0e06830de9a44394a7e366951eabca52>:0 
	  at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <0e06830de9a44394a7e366951eabca52>:0 
	  at Emby.Notifications.Discord.Notifier+<QueuedMessageSender>d__13.MoveNext () [0x000f1] in <d8bd754d47b94ea1a3041ab17783dc71>:0 
	Source: mscorlib
	TargetSite: Void Throw()

 

Looks like something specific to freebsd, so I'll have to see what I can do with this

  • Like 1
Link to comment
Share on other sites

Looks like something specific to freebsd, so I'll have to see what I can do with this

Ahh good that is it not something simple.

Thanks for your time!

Link to comment
Share on other sites

i understand, i think :)

 

my suggestion was to create his own server. mine for requestrr

 

 

OK, I probably misunderstood.. lol     i thought he wanted to alert a bunch of people but didn't want the discord server members to be able to see each other.  you are saying you can do that?  I was looking for a way to but couldn't figure it out! 

Edited by pir8radio
Link to comment
Share on other sites

Is this in the plugins directory yet?     :D

Now I have to figure out why HttpClient isn't working on freebsd and if the plugin doesn't work on all platforms its gonna be a no-no for sure :(

 

Apparently mono has had issues with HttpClient and Emby is running on a version from around 2018 which suffers from this issue..

 

I set up a freebsd VM and I am able to recreate with the same error

Link to comment
Share on other sites

Thanks @@rechigo I'm loving the plugin.

 

Any chance of adding the option to allow posting to separate channels? For example I have 2 channels setup, #movies & #series so I would like to enter the webhooks for each channel so that the #movies channel gets the Movie updates and the #series channels gets the episode updates.

 

Thanks again..

 

It can be done if you add 2 seperate users in Emby and set 1 up for movies and 1 for series notifications. But there are some issues at the moment and its not working correctly. Its fixed hopefully with next release.

  • Like 2
Link to comment
Share on other sites

Now I have to figure out why HttpClient isn't working on freebsd and if the plugin doesn't work on all platforms its gonna be a no-no for sure :(

 

Apparently mono has had issues with HttpClient and Emby is running on a version from around 2018 which suffers from this issue..

 

I set up a freebsd VM and I am able to recreate with the same error

Hi Rehigo,

 

Were you able to reproduce the issue?

Or can I help you with more information to help you?

 

Many thanks!

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
×
×
  • Create New...