Jump to content

New Plugin: Discord Notifications


rechigo

Recommended Posts

2 minutes ago, pir8radio said:

Oh that's right, this plugin still isn't in the catalog so it doesn't auto update?    @ebr

 

The last post out here from the plug-in dev was months ago and stated they were not fully up to speed.  We can only consider it for the catalog if the dev has the time and energy to fully support it because we cannot.  If that becomes the case, we can consider it.  Thanks.

Link to comment
Share on other sites

2 minutes ago, ebr said:

The last post out here from the plug-in dev was months ago and stated they were not fully up to speed.  We can only consider it for the catalog if the dev has the time and energy to fully support it because we cannot.  If that becomes the case, we can consider it.  Thanks.

understood, maybe he is willing to give it up, or someone else take it on...

Link to comment
Share on other sites

  • 2 weeks later...

Would love it if work continued on this, it been working out great, except it posts for every single new episode if a season is uploaded...

Link to comment
Share on other sites

11 hours ago, gwtong said:

Would love it if work continued on this, it been working out great, except it posts for every single new episode if a season is uploaded...

not working at all for me, latest version, latest beta..  weird..    just stopped a few months back.. checked settings all good, test works. but not new movies. 

Link to comment
Share on other sites

pir8radio
22 hours ago, darkside40 said:

I would suggest simply had over to Github and post an issue:

https://github.com/oonqt/Emby.Notifications.Discord

Maybe you get an answer by @rechigo

Or you fork it and fix it by yourself, thats the nice thing about Open Source Software.

yes but for some who don't have the knowledge, or time to learn, that doesn't mean much..   Kind of like saying "well your doctor wont answer the phone, the good thing about our freedom in the US is that you can perform the surgery on yourself."   🙂    we just need a new doctor here to perform surgery on this plugin...   

  • Haha 1
Link to comment
Share on other sites

I would even pay extra for this one to help with development was too good. Even if the dev team could implement it into the standard release

  • Like 1
Link to comment
Share on other sites

darkside40
On 5/7/2021 at 3:13 PM, pir8radio said:

yes but for some who don't have the knowledge, or time to learn, that doesn't mean much..   Kind of like saying "well your doctor wont answer the phone, the good thing about our freedom in the US is that you can perform the surgery on yourself."   🙂    we just need a new doctor here to perform surgery on this plugin...   

I know, the simple problem is that i dont think that there are so many community developers are left which could help out.

Plugin developement has always been a pita with Emby.

Link to comment
Share on other sites

Yeah it’s sad as it’s an amazing platform. Plex has the opposite but it’s bloat and I would never touch plex :(

Link to comment
Share on other sites

I am going to hit up Fiverr. See if I can find a C# dev to fix this. 

Is this okay/acceptable within the community? It would just be a one time fix but I have found a few people who offer Emby install/configure gigs that also seem to have some dev gigs. Just wanted to check and make sure I was not breaking any rules first.

Link to comment
Share on other sites

2 hours ago, Lyfesaver said:

I am going to hit up Fiverr. See if I can find a C# dev to fix this. 

Is this okay/acceptable within the community? It would just be a one time fix but I have found a few people who offer Emby install/configure gigs that also seem to have some dev gigs. Just wanted to check and make sure I was not breaking any rules first.

I would be willing to get in on that.   The issue is if no active emby user maintains this plugin, it will just die off again. 

 

Link to comment
Share on other sites

3 hours ago, pir8radio said:

I would be willing to get in on that.   The issue is if no active emby user maintains this plugin, it will just die off again. 

 

That's tomorrows problem. LOL - Or wait... will just a new version number break the plugin, even if it still technically works?

Link to comment
Share on other sites

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.

  • Thanks 1
Link to comment
Share on other sites

BillOatman

I just rebuilt it with the latest emby dll. The settings page opens, but I don't have any way of testing it further.  If someone wants to try this, and if it works I can try and figure out github enough to update the repo.

 

Emby.Notifications.Discord.dll.zip

  • Like 3
Link to comment
Share on other sites

Thanks so much for doing this! I tested for you.

I can get into the settings page and can also edit and save the configs per user.

Web hook works into Discord with the test message

image.thumb.png.bfda1a84b637eeac58a164e699f59cb8.png

Tested new tv eps and that also works

image.thumb.png.ed6fe2ad5d988bc13644e051c6b8c25f.png

Amazing work dude! i will do some more testing and report back

Seems once i swapped the discord messages over to two new users (one for tv and one for movies) it seems to have died. it worked with my account that had gomode access to everything but that shouldn't matter. the test function works for both accounts in the right discord channel as well.

I created Bot-Tv and Bot-Movie (both now admins)

Under emby -> notifications -> new content added.  Both have access I cant remember doing this last time?

image.png.005079bf04f6e139e7330cd4a8be7659.pngimage.png.daba1ce885760fad623a2c1cf198a795.png

 

Then in the plugin, all looks ok but nothing happens i think i must be doing something dumb.

image.png.1d5d29809570452695e9d9ea9d766fa8.png

Edited by ryzilla
Link to comment
Share on other sites

This is the error i seem to be getting, i think there could be a issue somewhere else now as when i added a plugin it spammed both channels

 

2021-05-17 13:12:08.964 Error App: Error in ItemAdded event handler
	*** Error Report ***
	Version: 4.5.4.0
	Command line: C:\Users\emby\AppData\Roaming\Emby-Server\system\EmbyServer.dll -noautorunwebapp
	Operating system: Microsoft Windows 10.0.19042
	Framework: .NET Core 3.1.9
	OS/Process: x64/x64
	Runtime: C:/Users/emby/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
	Processor count: 12
	Data path: C:\Users\emby\AppData\Roaming\Emby-Server\programdata
	Application path: C:\Users\emby\AppData\Roaming\Emby-Server\system
	System.NullReferenceException: System.NullReferenceException: Object reference not set to an instance of an object.
	   at Emby.Server.Implementations.Library.UserManager.GetInternalId(Guid id)
	   at Emby.Notifications.Discord.Notifier.isInVisibleLibrary(String UserId, BaseItem item)
	   at Emby.Notifications.Discord.Notifier.<>c__DisplayClass17_0.<ItemAddHandler>b__0(DiscordOptions options)
	   at System.Collections.Generic.List`1.ForEach(Action`1 action)
	   at Emby.Notifications.Discord.Notifier.ItemAddHandler(Object sender, ItemChangeEventArgs changeEvent)
	   at Emby.Server.Implementations.Library.LibraryManager.CreateItems(List`1 items, BaseItem parent, CancellationToken cancellationToken)
	Source: Emby.Server.Implementations
	TargetSite: Int64 GetInternalId(System.Guid)

 

Edited by ryzilla
Link to comment
Share on other sites

GrimReaper

Same here. Single admin user. And it's crashing my server.

2021-05-17 12:01:32.466 Error GlobalExceptionHandler: UnhandledException
	*** Error Report ***
	Version: 4.5.4.0
	Command line: C:\Users\olegt\AppData\Roaming\Emby-Server\system\EmbyServer.dll
	Operating system: Microsoft Windows 10.0.19042
	Framework: .NET Core 3.1.9
	OS/Process: x64/x64
	Runtime: C:/Users/olegt/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
	Processor count: 8
	Data path: C:\Users\olegt\AppData\Roaming\Emby-Server\programdata
	Application path: C:\Users\olegt\AppData\Roaming\Emby-Server\system
	System.NullReferenceException: System.NullReferenceException: Object reference not set to an instance of an object.
	   at Emby.Notifications.Discord.Notifier.<CheckForMetadata>b__15_0(KeyValuePair`2 queuedItem)
	   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__139_1(Object state)
	   at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute()
	   at System.Threading.ThreadPoolWorkQueue.Dispatch()
	Source: Emby.Notifications.Discord
	TargetSite: Void MoveNext()
	
2021-05-17 12:01:32.477 Info Main: Closing tray icon
2021-05-17 12:01:32.477 Info HttpClient: POST http://127.0.0.1:8024/exit
2021-05-17 12:01:32.484 Info Main: tray icon WaitForExit
2021-05-17 12:01:32.818 Info Main: tray icon exited
2021-05-17 12:01:32.828 Info Server: Stopping HttpListener...
2021-05-17 12:01:32.833 Info Server: HttpListener stopped
2021-05-17 12:01:32.833 Info App: Disposing CoreAppHost
2021-05-17 12:01:32.833 Info App: Disposing LoopUtilEntryPoint
2021-05-17 12:01:32.833 Info App: Disposing SyncNotificationEntryPoint
2021-05-17 12:01:32.833 Info App: Disposing SyncManagerEntryPoint
2021-05-17 12:01:32.833 Info App: Disposing ConnectEntryPoint
2021-05-17 12:01:32.833 Info App: Disposing Notifications
2021-05-17 12:01:32.833 Info App: Disposing EncodingManagerEntryPoint
2021-05-17 12:01:32.833 Info App: Disposing ActivityLogEntryPoint
2021-05-17 12:01:32.834 Info App: Disposing RecordingNotifier
2021-05-17 12:01:32.834 Info App: Disposing LiveTVEntryPoint
2021-05-17 12:01:32.834 Info App: Disposing EntryPoint
2021-05-17 12:01:32.834 Info App: Disposing ChannelsEntryPoint
2021-05-17 12:01:32.834 Info App: Disposing UserDataChangeNotifier
2021-05-17 12:01:32.834 Info App: Disposing SystemEvents
2021-05-17 12:01:32.834 Info App: Disposing StartupWizard
2021-05-17 12:01:32.834 Info App: Disposing ServerEventNotifier
2021-05-17 12:01:32.834 Info App: Disposing LibraryChangedNotifier
2021-05-17 12:01:32.834 Info App: Disposing KeepServerAwake
2021-05-17 12:01:32.834 Info App: Disposing AutomaticRestartEntryPoint
2021-05-17 12:01:32.834 Info App: Disposing LibraryMonitorStartup
2021-05-17 12:01:32.834 Info App: Disposing DeviceAccessEntryPoint
2021-05-17 12:01:32.834 Info App: Disposing NewsEntryPoint
2021-05-17 12:01:32.834 Info App: Disposing PlaylistsEntryPoint
2021-05-17 12:01:32.834 Info App: Disposing UdpServerEntryPoint
2021-05-17 12:01:32.834 Info App: Disposing ApiEntryPoint

 

Link to comment
Share on other sites

BillOatman

Interesting trying to debug something I don't have a clue about :)
Looks like there is a configuration item it refers to as options.MediaBrowserUserId that it expects to see a GUID, but it is null.
This version should deal with that situation more gracefully, but hopefully you know what is missing.

The one reported by GrimReaper I don't understand.  A exception there should be handled.  But try this version and see what happens.  

If you get a failure please get me the server log.

Emby.Notifications.Discord1001.dll.zip

Link to comment
Share on other sites

GrimReaper

Thanks for bothering with this.

Unfortunately, same occurrence with latest version:

Server started > Put one movie into library folder > Scan Library Files > 30ish secs in Error, Server crash.

Log attached.

embyserver-63756866098.txt

Link to comment
Share on other sites

BillOatman
15 minutes ago, GrimReaper76 said:

Thanks for bothering with this.

Unfortunately, same occurrence with latest version:

Server started > Put one movie into library folder > Scan Library Files > 30ish secs in Error, Server crash.

Log attached.

embyserver-63756866098.txt 59.6 kB · 0 downloads

That was helpful thanks.  Can you turn on debug logging and do the same thing please?

Link to comment
Share on other sites

GrimReaper
9 minutes ago, BillOatman said:

That was helpful thanks.  Can you turn on debug logging and do the same thing please?

Sure, here it is. Same process: Server start - Add single movie - Scan Library Files - Crash.

embyserver.txt

 

Edited by GrimReaper76
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...