Tautulli / Tautulli-Issues

Bug reports for Tautulli
18 stars 3 forks source link

MEDIA_CAPTION_TOO_LONG error for Telegram when poster is enabled #20

Closed enchained closed 6 years ago

enchained commented 6 years ago

Version: v2.0.22 Branch: master Commit hash: a08bce2073b1847762a22a843b13acc5f996d9cb Operating system: Linux 3.10.102 Python version: 2.7.13 (default, Apr 20 2017, 12:13:37) [GCC 6.3.0]

What you did? Edited notification template on recently added - to include {summary} and {genres}. What happened? Recently added otifications immediately stopped coming to Telegram. What you expected? Notifications to appear. How can we reproduce your issue?

Errors on the time of the issue: 2018-03-11 06:26:06 - DEBUG :: Thread-2 : Tautulli Notifiers :: Request response: {"ok":false,"error_code":400,"description":"Bad Request: MEDIA_CAPTION_TOO_LONG"}

Link to full logs: https://pastebin.com/h1WZBgwW

I see from the changelog that Telegram notifications has been changed to poster+message in 1 message, i.e. using picture caption as a message. However, said caption has a character limit of 200 symbols, so any notifications more that that are failing (have an x mark in the Notification Log). Most notifications are fine with such limit, but not my case, and I suppose that it's not a rare one.

One supposedly easy solution that comes to mind is to send it the old way, as a separate message, when it's > 200 chars.

enchained commented 5 years ago

@JonnyWong16 Could you please adjust the caption limit from 200 to 1024? They increased the limit recently: https://t.me/tgbeta/3281 https://core.telegram.org/bots/api#sendphoto

samwiseg0 commented 5 years ago

@enchained the modifications have been made to nightly. https://github.com/Tautulli/Tautulli/commit/86b1d0f51d06cfc316310f5acd1c4a2546ed630d Can you test these changes?

enchained commented 5 years ago

Can you test these changes?

I switched to nightly in web ui, can confirm that larger caption works now and message does not get split. For some reason can't switch back to stable/master (interface thinks it's still on master, despite the version now says V2.1.23-BETA), but I guess I don't mind that.

samwiseg0 commented 5 years ago

Shutdown Tautulli. Go to the folder where it is installed and run the command git checkout beta. Then start Tautulli back up.

$ git checkout beta
Switched to branch 'beta'
Your branch is up to date with 'origin/beta'.