RomainPierre7 / jellyfin-plugin-TelegramNotifier

Jellyfin media server plugin to easily send notifications on Telegram !
https://jellyfin.org/
GNU General Public License v3.0
31 stars 3 forks source link

Playback start notification does not work #14

Closed STRUBartacus closed 3 weeks ago

STRUBartacus commented 3 weeks ago

Hello

Thank you very much for this plugin. Unfortunately, the Playback Start notification does not work for me, although it is activated, see screenshot. Playback Stop, on the other hand, works. What is the problem and how can I fix it?

Thanks and regards

grafik

grafik

RomainPierre7 commented 3 weeks ago

Hello and thanks for using the plugin ;)

This notification works for (latest plugin and Jellyfin version) and it's the first time someone tells me this error.

Maybe check your logs. Use Ctrl+f and search for "telegram" to easily find the relevant logs. If the message is well sent you should see Jellyfin.Plugin.TelegramNotifier.Plugin: ("PlaybackStart"): Message sent successfully..

Tell me what you have when you start your content and try with another user to see if you still get the same issue.

Hope we will find out !

STRUBartacus commented 3 weeks ago

Thanks for the quick reply! :-)

I was able to find that in the logs:

[2024-11-04 15:22:35.320 +01:00] [ERR] ("PlaybackStart"): Message could not be sent, please check your configuration.
[2024-11-04 15:23:24.601 +01:00] [INF] ("PlaybackStop"): Message sent successfully.
RomainPierre7 commented 3 weeks ago

So the notifier has been activated... That's odd. Do you have more details about the event itself in the logs next to it ?

STRUBartacus commented 3 weeks ago

These are the logs of a start/stop event:

[2024-11-04 15:18:44.952 +01:00] [INF] User policy for "censored". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[2024-11-04 15:18:45.222 +01:00] [INF] Current HLS implementation doesn't support non-keyframe breaks but one is requested, ignoring that request
[2024-11-04 15:18:45.222 +01:00] [INF] "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-analyzeduration 200M -probesize 1G -f matroska -init_hw_device vaapi=va:,vendor_id=0x8086,driver=iHD -init_hw_device qsv=qs@va -filter_hw_device qs -hwaccel vaapi -hwaccel_output_format vaapi -noautorotate -i file:\"/media/videos/Serien/King of Queens/Season 4/S4E13 - Die Fressaffäre.mkv\" -noautoscale -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_qsv -low_power 1 -preset veryfast -b:v 9314833 -maxrate 9314833 -bufsize 18629666 -profile:v:0 high -level 51 -g:v:0 72 -keyint_min:v:0 72 -vf \"setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale_vaapi=format=nv12:extra_hw_frames=24,hwmap=derive_device=qsv,format=qsv\" -codec:a:0 libfdk_aac -ac 2 -ab 256000 -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type mpegts -start_number 0 -hls_segment_filename \"/var/cache/jellyfin/transcodes/a9917bdee7558070085a4d10082ebb3c%d.ts\" -hls_playlist_type vod -hls_list_size 0 -y \"/var/cache/jellyfin/transcodes/a9917bdee7558070085a4d10082ebb3c.m3u8\""
[2024-11-04 15:18:46.137 +01:00] [INF] Reaching for image: "http://https://media.censored.net/Items/c88daac2-4d85-ec05-45a9-b95884c453c9/Images/Primary"
[2024-11-04 15:18:46.160 +01:00] [ERR] ("PlaybackStart"): Message could not be sent, please check your configuration.
[2024-11-04 15:18:50.968 +01:00] [INF] Stopping ffmpeg process with q command for "/var/cache/jellyfin/transcodes/a9917bdee7558070085a4d10082ebb3c.m3u8"
[2024-11-04 15:18:51.312 +01:00] [INF] FFmpeg exited with code 0
[2024-11-04 15:18:51.312 +01:00] [INF] Deleting partial stream file(s) "/var/cache/jellyfin/transcodes/a9917bdee7558070085a4d10082ebb3c.m3u8"
[2024-11-04 15:18:52.832 +01:00] [INF] Playback stopped reported by app "Jellyfin Web" "10.10.1" playing "Die Fressaffäre". Stopped at "4057" ms
[2024-11-04 15:18:52.917 +01:00] [INF] ("PlaybackStop"): Message sent successfully.
STRUBartacus commented 3 weeks ago

By the way: Playback Progress works:

[2024-11-04 15:19:17.200 +01:00] [ERR] ("PlaybackStart"): Message could not be sent, please check your configuration.
[2024-11-04 15:19:18.775 +01:00] [INF] ("PlaybackProgress"): Message sent successfully.
[2024-11-04 15:19:19.543 +01:00] [INF] ("PlaybackProgress"): Message sent successfully.
[2024-11-04 15:19:20.536 +01:00] [INF] ("PlaybackProgress"): Message sent successfully.
[2024-11-04 15:19:21.600 +01:00] [INF] ("PlaybackProgress"): Message sent successfully.
[2024-11-04 15:19:22.645 +01:00] [INF] ("PlaybackProgress"): Message sent successfully.
[2024-11-04 15:19:23.528 +01:00] [INF] ("PlaybackProgress"): Message sent successfully.
[2024-11-04 15:19:24.634 +01:00] [INF] ("PlaybackProgress"): Message sent successfully.
[2024-11-04 15:19:25.169 +01:00] [INF] ("PlaybackProgress"): Message sent successfully.
[2024-11-04 15:19:26.249 +01:00] [INF] ("PlaybackProgress"): Message sent successfully.
[2024-11-04 15:19:27.294 +01:00] [INF] ("PlaybackProgress"): Message sent successfully.
[2024-11-04 15:19:28.259 +01:00] [INF] ("PlaybackProgress"): Message sent successfully.
[2024-11-04 15:19:29.266 +01:00] [INF] ("PlaybackProgress"): Message sent successfully.
[2024-11-04 15:19:30.261 +01:00] [INF] ("PlaybackProgress"): Message sent successfully.
[2024-11-04 15:19:31.339 +01:00] [INF] ("PlaybackProgress"): Message sent successfully.
RomainPierre7 commented 3 weeks ago

My best guess is because playback start shows an image within the message. That's the only difference with playback stop.

Reaching for image: "http://https://media.censored.net/Items/c88daac2-4d85-ec05-45a9-b95884c453c9/Images/Primary

The url of the image you are trying to reach for in your log is incorrect (twice https://)

STRUBartacus commented 3 weeks ago

I have found the error: I changed the server URL to localhost:8086 and now it works. Thank you very much for your help

RomainPierre7 commented 3 weeks ago

Oh exactly, you don't have to write the http.s method for the server address like in the examples. I'm glad it works now.

Thanks for using the plugin. Enjoy ;)