samwiseg0 / better-discord-notifications

Scripts that send better sonarr/radarr notifications to discord
GNU General Public License v3.0
15 stars 0 forks source link

Format of sonarr_discord_user variable #1

Closed eWU6yS6F closed 6 years ago

eWU6yS6F commented 6 years ago

What format should this take? I've currently set it to Sonarr which uses that name to post to the channel but I am having a problem with no images showing and am wondering if it's related. Logs show the correct tvdb banner, but none show up in the channel.

samwiseg0 commented 6 years ago

It is just the username that shows when the message is sent. You can put anything in there. That should not stop the message from sending. Is the webhook set properly?

samwiseg0 commented 6 years ago

I miss read. so your saying the message makes it there but the images do not show?

eWU6yS6F commented 6 years ago

Yes, that's correct - text but no image. I was testing on android (both in app and in browser), I've just tested on PC and exactly the same there: screenshot.

I've dowloaded multiple episodes from a number of shows with the same result each time.

samwiseg0 commented 6 years ago

you mind posting the raw json?

eWU6yS6F commented 6 years ago

sure, last episode downloaded:

    "content": "New episode downloaded - Carl's Pissed: Memories of Joe",
    "embeds": [
        {
            "author": {
                "icon_url": "https://github.com/Sonarr/Sonarr/raw/develop/Logo/256.png",
                "name": "TV",
                "url": "https://[REDACTED]/sonarr/"
            },
            "color": 3394662,
            "fields": [
                {
                    "inline": true,
                    "name": "Episode",
                    "value": "s01e01"
                },
                {
                    "inline": true,
                    "name": "Quality",
                    "value": "WEBDL-480p"
                },
                {
                    "inline": true,
                    "name": "Upgrade?",
                    "value": "False"
                }
            ],
            "image": {
                "url": "http://thetvdb.com/banners/graphical/85372-g2.jpg"
            },
            "title": "Carl's Pissed: Memories of Joe",
            "url": "https://[REDACTED]/sonarr/series/carls-pissed"
        },
        {
            "color": 3381708,
            "description": "Carl agonizes over the departure of New York Yankees manager Joe Torre and fondl
 remembers some times they shared together.",
            "footer": {
                "text": "Carls.Pissed.S01E01.480p.WEBRip.x264-Xes"
            },
            "timestamp": "2018-07-31T17:52:27.310757",
            "title": "Overview"
        }
    ],
    "username": "Sonarr"
}
samwiseg0 commented 6 years ago

Tested your message at https://leovoel.github.io/embed-visualizer/ and it works. It honestly might be discord. They host the images themselves. Once you send a web hook with an image they go and cache it.

You may need to wait a few hours and the issue my resolve itself.

2018-07-31_14-46-08

samwiseg0 commented 6 years ago

I am going to close this for now. Feel free to leave a comment if this issue persists and I will look into it further. If it does start working I would like to know as well.

Thanks

eWU6yS6F commented 6 years ago

Hey just letting you know I figured out the problem - I have the discord setting to show inline images if they are uploaded to discord but not when posted as links to the chat. Usually this results in a link being shown in place (as in the discorddit script) but I guess this script does the embeds differently and the image is silently omitted when that option is enabled.

Enabling images posted as links allows it to work

samwiseg0 commented 6 years ago

Hmmm. I will look into it. I am following the webhook documentation.

Do you mind telling me which setting you changed? Also which client are you using?

eWU6yS6F commented 6 years ago

The "When posted as links to chat" option. Same result using both the official android client and a web browser.

Compare with the Discorddit-Webhook script which leaves a link in place. It's not a problem for me, I've just enabled that option for the one device I'll be using to receive notifications.

samwiseg0 commented 6 years ago

Weird. They are doing the same thing I am. I will poke around. Now it kinda bugs me...

samwiseg0 commented 6 years ago

Oh I know why this works there... Its bc they push the image URL to the description when there is one present. So in reality the same thing is happening on that message where it just disappears. The URL is present all the time regardless since it is in the description field.