Jump to content

New Plugin: Discord Notifications


rechigo

Recommended Posts

grafxxx

Yes I thought as @GrimReaper76was posting about 4.6.0.50 that this is the new realease. just looked on the website and can not find it for debian. still 4.5.4.0 and my current beta so what was he testing?

Link to comment
Share on other sites

BillOatman
3 minutes ago, grafxxx said:

Yes I thought as @GrimReaper76was posting about 4.6.0.50 that this is the new realease. just looked on the website and can not find it for debian. still 4.5.4.0 and my current beta so what was he testing?

I see this, not sure how quickly other platforms roll out.

Emby Server
Windows
Stable: v4.6.0.50 (2021/05/19)

Link to comment
Share on other sites

grafxxx

ok have to wait then and test again as soon debian version is available.

Link to comment
Share on other sites

GrimReaper
Posted (edited)
39 minutes ago, BillOatman said:

@Luke This is how it is populating images ... should anything have changed in this server/library release for this (the exception message is not in the log)?




                           // populate images
                            if (item.HasImage(ImageType.Primary))
                            {
                                string imageUrl = "";

                                if (!item.GetImageInfo(ImageType.Primary, 0).IsLocalFile)
                                {
                                    imageUrl = item.GetImagePath(ImageType.Primary);
                                }
                                else if (serverConfig.EnableRemoteAccess == true && !options.ExcludeExternalServerLinks) // in the future we can proxy images through memester server if people want to hide their server address
                                {
                                    imageUrl = $"{sysInfo.WanAddress}/emby/Items/{itemId}/Images/Primary";
                                }
                                else
                                {
                                    string localPath = item.GetImagePath(ImageType.Primary);

                                    try
                                    {
                                        ImageServiceResponse response = MemesterServiceHelper.UploadImage(localPath, _jsonSerializer);
                                        imageUrl = response.filePath;
                                    }
                                    catch (Exception e)
                                    {
                                        _logger.ErrorException("Failed to proxy image", e);
                                    }
                                }

                                mediaAddedEmbed.embeds.First().thumbnail = new Thumbnail
                                {
                                    url = imageUrl
                                };
                            }

 

Sorted.

1251292995_Screenshot2021-05-19224707.png.49e25bcdcc93fe189ad09d181b433da5.png

 

Looking at the code you posted, Remote Access needed to be enabled and port forwarded. Kinda like images get pulled instead of pushed.

 

Edit: And one for Movies. So, all sorted. 👍

2139275177_Screenshot2021-05-19225356.png.f4c9dfed73bd6920000a7b7ea5284dc0.png

 

Edited by GrimReaper76
  • Thanks 1
Link to comment
Share on other sites

BillOatman
Posted (edited)

What's weird @GrimReaper76 is I didn't change the code.  So something in the server changed on the upgrade?

But glad you figured it out!  I submitted that change to the owner so there should ne a official release soon.

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

samuelqwe
8 minutes ago, BillOatman said:

What's weird @GrimReaper76 is I didn't change the code.  So something in the server changed on the upgrade?

I think it’s just that before Discord was trying to access the images but couldn’t because his server wasn’t remotely accessible. Once he enabled remote access, Discord could finally reach the server and get the images.

  • Like 1
Link to comment
Share on other sites

GrimReaper
37 minutes ago, BillOatman said:

What's weird @GrimReaper76 is I didn't change the code.  So something in the server changed on the upgrade?

But glad you figured it out!  I submitted that change to the owner so there should ne a official release soon.

Nah, it was on my end (although not something I would think at first), and kept Remote Access disabled on test 4.6.0.50 server as there was no need for it, and by chance you posted that extract. I envisioned the notification and artwork to get pushed to Discord, looks like artwork gets pulled and Remote access is required. 

32 minutes ago, samuelqwe said:

I think it’s just that before Discord was trying to access the images but couldn’t because his server wasn’t remotely accessible. Once he enabled remote access, Discord could finally reach the server and get the images.

Yup, sounds about right. 

Link to comment
Share on other sites

Is this all good now on 4.6?

Link to comment
Share on other sites

BillOatman
37 minutes ago, Luke said:

Is this all good now on 4.6?

Yeah seems that way thanks.  Just waiting for the github update and "official" release.  Thanks!

  • Thanks 1
Link to comment
Share on other sites

rechigo
6 hours ago, BillOatman said:

@rechigo  I submitted another pull request for todays emby server release.

I checked the Github and I did not see any pull requests open. I looked for your fork and was unable to find it in the list (privated repo?)

image.png.89a59afa1dbc1d8e9c1721138dc2355c.png

I noticed some people were having trouble getting images embedded into Discord. If you have strict firewall rules, your firewall may be blocking requests to the image proxy (https://i.memester.xyz). I believe someone here had that issue before and they were able to resolve it with a new firewall rule. It's also possible that the server I'm running the image proxy on was off for a couple of hours for some maintenance recently. This image proxy is used under two circumstances: 

1) Remote access is disabled on the server

2) You have the ExcludeExternalServerLinks option checked on the config page (Hides direct links to server)

  • Thanks 1
Link to comment
Share on other sites

kelly.clubb

Updated to latest stable (it was newer than the version for my beta so it worked out). Updated to the latest discord notifcations dll and it's now fully working for me. Thank you for all of those that put work into making this work.

  • Like 1
Link to comment
Share on other sites

kelly.clubb

Have a friend that is in the same boat, hopefully it releases soon.

Link to comment
Share on other sites

BillOatman
Posted (edited)
10 hours ago, rechigo said:

I checked the Github and I did not see any pull requests open. I looked for your fork and was unable to find it in the list (privated repo?)

image.png.89a59afa1dbc1d8e9c1721138dc2355c.png

I noticed some people were having trouble getting images embedded into Discord. If you have strict firewall rules, your firewall may be blocking requests to the image proxy (https://i.memester.xyz). I believe someone here had that issue before and they were able to resolve it with a new firewall rule. It's also possible that the server I'm running the image proxy on was off for a couple of hours for some maintenance recently. This image proxy is used under two circumstances: 

1) Remote access is disabled on the server

2) You have the ExcludeExternalServerLinks option checked on the config page (Hides direct links to server)

Weird.  Here are the 2 files that changed.  Set the version however you think is best, I just did that to keep them separate.

I also tried to do the pull request again, have a look.

Emby.Notifications.Discord.zip

Edited by BillOatman
Link to comment
Share on other sites

GrimReaper
27 minutes ago, BillOatman said:

@GrimReaper76 Are you getting your server name in the discord notification or "Emby Server"?

Yeah, all peachy.

1363077321_Screenshot2021-05-20155810.png.9eed5020efe6a09da8b0c4cdfe27ed23.png

  • Like 1
Link to comment
Share on other sites

ryzilla

Ive updated to the latest non beta and all is working as intended well done team!

  • Thanks 1
Link to comment
Share on other sites

rechigo

@BillOatmanIs it alright if I distribute builds for .48 beta or was there a reason it was build against .50 (stable)? Beta users don't actually get the stable release (.50), so they aren't able to run the plugin because the SDK is for the newer version

Link to comment
Share on other sites

BillOatman
4 minutes ago, rechigo said:

@BillOatmanIs it alright if I distribute builds for .48 beta or was there a reason it was build against .50 (stable)? Beta users don't actually get the stable release (.50), so they aren't able to run the plugin because the SDK is for the newer version

It wasn't working correctly with the previous build so when Luke released that one I switched to it and things started working again.
Its up to you what you release with :)   I'd build with the latest and just ask beta users to get the stable :) 

Link to comment
Share on other sites

pir8radio
Posted (edited)

so what is the latest version that works?     I have the one posted in this post: 

 

 

however its still not working for me with these settings...   and the settings look like something is up some of the library options say "Header" ahead of the actual emby library name.    I'm on latest beta.

image.png.ce8ee9339a292a2c076057d97f8d81bd.png

 

 

 

 

Edited by pir8radio
Link to comment
Share on other sites

kelly.clubb
1 hour ago, BillOatman said:

It wasn't working correctly with the previous build so when Luke released that one I switched to it and things started working again.
Its up to you what you release with :)   I'd build with the latest and just ask beta users to get the stable :) 

I also went from beta to stable since it was technically a uptick in version number so I'm now on .60 stable and all works for the plugin. Windows build.

Link to comment
Share on other sites

grafxxx
Posted (edited)

So I'm now on the new stable debian version, with the latest plugin but I still don't get enriched movie or shows. Instead now I get the notification twice and one time it is white and the other blue. I attached the screenshot. Can you please help me @BillOatman? Since moving to the stable emby server crashes when scanning the library (crash at around 90%).

 

IMG_ADDA5D7E723D-1.jpeg

embyserver.txt

Edited by grafxxx
Link to comment
Share on other sites

BaukeZwart
Posted (edited)

An other variation here, I'm getting enriched data only without the external links. 

Emby 4.6.0.50, plugin version 11112.
Synology OS, docker container.

Screenshot_20210521-091040.jpg

embyserver.txt

Edited by BaukeZwart
Log added
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...