jellyfin-plugin-webhook icon indicating copy to clipboard operation
jellyfin-plugin-webhook copied to clipboard

Notify fail when variable {Overview} include new line charactor

Open smallghost opened this issue 4 years ago • 5 comments
trafficstars

When I setup notification and send new item added event to slack, some item will show 'Invalid payload' from slack client. I enable debug log and check the payload body, i copy the body and paste to notepad++, i saw more than one new line in the payload, it make json broke.

Note: this problem only happened in Overview variable

smallghost avatar Jul 20 '21 06:07 smallghost

Can you provide the template and payload that you saw the error with so I can easily reproduce? Feel free to anonymize any information

crobibero avatar Jul 20 '21 11:07 crobibero

Here is information provide to you, the payload you may feel confusion, it's fine, because the original word is Chinese word and i don't know how to get right display word from the server log.

The broke overview data come from TMDB, the movie title is Raya and the Last Dragon and the Chinese overview has three sections, which end with new line, i think the payload json broke problem in here.

smallghost avatar Jul 20 '21 14:07 smallghost

I'm trying to debug this, but it looks like the payload is broken in the json editor you linked image

Can you please paste the contents directly in a comment?

crobibero avatar Jul 23 '21 23:07 crobibero

your are right, in json editor, you can see the broken json format, that's the root cause, if paste it in github comment, the special character will ignore by github.

smallghost avatar Jul 24 '21 06:07 smallghost

@crobibero I update the payload content, i find how to display correct character. and I using notepad++ to see the special character CR below 螢幕擷取畫面 2021-07-26 013819

smallghost avatar Jul 25 '21 17:07 smallghost