Jump to content

New Plugin: Discord Notifications


Recommended Posts

BillOatman
Posted
9 minutes ago, GrimReaper76 said:

Attached. All same, this time added an episode instead of a movie. And pls do note that Test message IS going through, as it did from the start.

Yeah thats because its barfing trying to process whats in the queue from Emby, not talking to discord.

And again please ... tracking down the exact issue. As always, debug on.

 

Emby.Notifications.Discord103.dll.zip

  • Like 1
GrimReaper
Posted (edited)

New Media notification just came through now, for that last episode added.

200421771_Screenshot2021-05-17174954.png.27e61ca9f065c093d2ce67f388ff141a.png

Although it ain't enriched as @ryzilla's screenshot:

image.thumb.png.ed6fe2ad5d988bc13644e051c6b8c25f.png.e85c4c76b0993f2390fa2056b53402b2.png

 

even though is marked in Plugin settings:

1839592233_Screenshot2021-05-17175331.thumb.png.87dc588d9e23e8b619b25806e471ef4d.png

 

Edit: I think that's my hourly Playback Reporting plugin New Media notification.

Edited by GrimReaper76
BillOatman
Posted
1 minute ago, GrimReaper76 said:

New Media notification just came through now, for that last episode added.

200421771_Screenshot2021-05-17174954.png.27e61ca9f065c093d2ce67f388ff141a.png

Although it ain't enriched as @ryzilla's screenshot:

image.thumb.png.ed6fe2ad5d988bc13644e051c6b8c25f.png.e85c4c76b0993f2390fa2056b53402b2.png

 

even though is marked in Plugin settings:

1839592233_Screenshot2021-05-17175331.thumb.png.87dc588d9e23e8b619b25806e471ef4d.png

Probably because of the issue its having processing the queue from Emby.  We're getting there :)

  • Like 1
BillOatman
Posted
Just now, GrimReaper76 said:

Here, same.

No server log :)

  • Haha 1
BillOatman
Posted
11 minutes ago, GrimReaper76 said:

Yeah, sorry. 🤦‍♂️

It seems to be making some assumptions on what "richer" data exists that may not always be true.  Dialing in now what exactly the field is. Same, debug on please.
 

Emby.Notifications.Discord104.dll.zip

  • Like 1
GrimReaper
Posted
4 minutes ago, BillOatman said:

It seems to be making some assumptions on what "richer" data exists that may not always be true.  Dialing in now what exactly the field is. Same, debug on please.
 

Emby.Notifications.Discord104.dll.zip 55.72 kB · 0 downloads

That's some great progress. As ALL my metadata and artwork is handled by 3rd party app and only parsed by Emby, maybe it ain't writing something plugin is looking for.

embyserver.txt

BillOatman
Posted
13 minutes ago, GrimReaper76 said:

That's some great progress. As ALL my metadata and artwork is handled by 3rd party app and only parsed by Emby, maybe it ain't writing something plugin is looking for.

 

And same again please.  

Emby.Notifications.Discord105.dll.zip

  • Like 1
BillOatman
Posted (edited)

@GrimReaper76  What is your server name configured as for the plugin? And is ServerNameOverride true or false?

Edited by BillOatman
  • Thanks 1
GrimReaper
Posted
Just now, BillOatman said:

@GrimReaper76  What is your server name configured as for the plugin?

1420772218_Screenshot2021-05-17185024.thumb.png.7c6d4cebe180efc82ac2455f9c138fe7.png

 

Maybe no space?

Lemme test.

BillOatman
Posted (edited)
3 minutes ago, GrimReaper76 said:

1420772218_Screenshot2021-05-17185024.thumb.png.7c6d4cebe180efc82ac2455f9c138fe7.png

 

Maybe no space?

Lemme test.

Whats your emby server name itself?  And the thing to try would be unchecking "Replace "Emby Server with your server name" and trying

webhook name shouldnt matter as that seems to be working

Edited by BillOatman
  • Thanks 1
GrimReaper
Posted
Just now, BillOatman said:

Whats your server name itself?  And the thing to try would be unchecking "Replace "Emby Server with your server name" and trying

webhook name shouldnt matter as that seems to be working

Server name itself is BLADE. Same as I changed Webhook name to, now. Still no joy, test message goes through, new media crashes server.

78670686_Screenshot2021-05-17185413.png.2506bbaf9f5997504df2f78c5d7d3101.png

1222398736_Screenshot2021-05-17185611.png.d00029166532ae7de37dd700c8ccea8e.png

embyserver-63756874552.txt

BillOatman
Posted

@GrimReaper76   uncheck "Replace Emby Server with your server name" and try, no need for server log on this one

  • Thanks 1
GrimReaper
Posted (edited)
6 minutes ago, BillOatman said:

@GrimReaper76   uncheck "Replace Emby Server with your server name" and try, no need for server log on this one

In process.

Edit: @BillOatman Man, you're awesome. 👏👏👏💪 HUGE thanks for going through all this. I'd like to drop you a beer, is there a place I could do that? Thanks again.

1187420635_Screenshot2021-05-17190134.png.0e87750be1e3d4db098589a3e10d2b98.png

Edited by GrimReaper76
BillOatman
Posted (edited)

@GrimReaper76 Sweet :)  Thanks for the offer, but maybe just help @ryzilla if he needs it.  He seems to be missing some GUID in his configuration.

I'll ask for some more help in a bit, I'll try and put some kind of fix in for the server name.

@Luke  It's doing this to get the server name, which he has set but apparently is coming through as null to the plugin.

private readonly IServerConfigurationManager _serverConfiguration;

public Notifier(ILogManager logManager, IJsonSerializer jsonSerializer, IServerConfigurationManager serverConfiguration, ...
_serverConfiguration = serverConfiguration;

 ServerConfiguration serverConfig = _serverConfiguration.Configuration;
 string serverName = options.ServerNameOverride ? serverConfig.ServerName : "Emby Server";  // Note:  options.ServerNameOverride is true

mediaAddedEmbed.embeds.First().title = $"{titleText} has been added to {serverName.Trim()}"; // serverName.Trim() throws null reference exception

Is that not correct any more?

Edited by BillOatman
  • Like 1
GrimReaper
Posted
5 minutes ago, BillOatman said:

@GrimReaper76 Sweet :)  Thanks for the offer, but maybe just help @ryzilla if he needs it.  He seems to be missing some GUID in his configuration.

I'll ask for some more help in a bit, I'll try and put some kind of fix in for the server name.

@Luke  It's doing this to get the server name, which he has set but apparently is coming through as null to the plugin.


private readonly IServerConfigurationManager _serverConfiguration;

public Notifier(ILogManager logManager, IJsonSerializer jsonSerializer, IServerConfigurationManager serverConfiguration, ...
_serverConfiguration = serverConfiguration;

 ServerConfiguration serverConfig = _serverConfiguration.Configuration;
 string serverName = options.ServerNameOverride ? serverConfig.ServerName : "Emby Server";  // Note:  options.ServerNameOverride is true

Is that not correct any more?

Sure, if he chimes in. I'm getting no more errors in log, so that's that. 👍

BillOatman
Posted

@GrimReaper76 Try this with "Replace Emby Server with your server name" checked again.  Debug log only if it fails please.  I suspect you won't get your server name but it should at least not fail with it checked. After Luke tells me whats wrong I'll try and make the server name work and see about getting this change into github.

Emby.Notifications.Discord107.dll.zip

  • Like 2
GrimReaper
Posted
28 minutes ago, BillOatman said:

@GrimReaper76 Try this with "Replace Emby Server with your server name" checked again.  Debug log only if it fails please.  I suspect you won't get your server name but it should at least not fail with it checked. After Luke tells me whats wrong I'll try and make the server name work and see about getting this change into github.

Emby.Notifications.Discord107.dll.zip 55.86 kB · 1 download

"Replace Emby Server with your server name" checked, content added, notification WITH Webhook name received, no errors thrown in log, all peachy. Great work, mate. 💪

BillOatman
Posted
Just now, GrimReaper76 said:

"Replace Emby Server with your server name" checked, content added, notification WITH Webhook name received, no errors thrown in log, all peachy. Great work, mate. 💪

Sweet thanks.  

BillOatman
Posted
On 5/13/2021 at 11:17 PM, rechigo said:

I am sorry for been updating this plugin, I just have not had the time nor motivation to work on it anymore, and I kinda forgot it even existed to be totally honest.. If anybody would like to fork the Github repo to try and fix it up & submit some pull requests, I (and it would appear the community members as well) would very much appreciate it. I still have the Github repo linked to a Discord webhook so I'll see whenever a pull request has been started and I'll be able to review them & publish releases to this thread & Github releases. This plugin desperately needs to be rewritten, I have very little knowledge in C# so the code isn't very readable to say the least, I believe this was my first project that I ever worked on with C#. 

 

tldr; I have been too busy & lacking in motivation to work on this plugin recently. if anyone is interested in maintaining this plugin, please let me know via PMs.

Hi:  I think I just put in a pull request to get it back functioning again.

  • Thanks 1

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...