Jump to content

Telegram Notifications Plugin


Recommended Posts

Posted
On 07/09/2025 at 18:31, howllor said:

Where an I supposed to put the code? I already have the plugin from this thread installed.

You need to install python https://www.python.org/downloads/ make sure to check add to path when installing then paste the code in a notepad and save it as whatever name u like with the file extension .py e.g telegram.py then run it from a console. (Open cmd change directory to the folder where u save the code then type python telegram.py)

  • Thanks 1
darkside40
Posted
9 hours ago, Luke said:

@darkside40can you add image support? There is good sample code here:

https://github.com/MediaBrowser/Emby.Plugins.Slack/blob/master/Emby.Notification.Slack/Notifier.cs#L76C17-L89C18

Just update the project to use the 4.8.11 nuget package or higher.

Honestly i dont have any working Visual Studio IDE here running, neither a Windows OS and nobody could explain to me how to build Emby Plugins with VS Code etc. when i akses years ago.

The Plugin is open source and not very complicated. So if anybody like to modify it everyone is free to fork it. I have not used it in months to honest.

  • Thanks 1
Posted
34 minutes ago, FranFernando said:

hola, como se instalaria, no hay ninguna dll como en el anterior hilo...

Hi, did you read the first post?

darkside40
Posted
On 9/8/2025 at 10:16 PM, Luke said:

@darkside40can you add image support? There is good sample code here:

https://github.com/MediaBrowser/Emby.Plugins.Slack/blob/master/Emby.Notification.Slack/Notifier.cs#L76C17-L89C18

Just update the project to use the 4.8.11 nuget package or higher.

The imageurl what kind of url does it hold? An internal IP to the image(what would be kind of useless)? Or does the server has to be reachable from outside (which would also be problematic), or the URL to the source of the Image where it was loaded when the content was added?

Posted
7 minutes ago, darkside40 said:

The imageurl what kind of url does it hold? An internal IP to the image(what would be kind of useless)? Or does the server has to be reachable from outside (which would also be problematic), or the URL to the source of the Image where it was loaded when the content was added?

It's a remote url because that's all we can do with Slack. If you're able to attach the image to the notification in bytes, that would be the best approach of all. If you can do that then I can give you some sample code.

hcastanedar_smr
Posted

I’m on Emby 4.7.14 (Ubuntu). Plugin’s been solid to a Telegram channel once I messaged the bot first. For covers, I didn’t modify the plugin, I pointed Emby’s webhook to a Node script, wait 30s, fetch /Items/{id}/Images/Primary with an api key, then push to Telegram sendPhoto. That also stopped the filename only pings. On 4.8.0.13 I had to re save my notification rules after upgrade to get events again.
 

hcastanedar_smr
Posted

For multi channel OTPs and alerts in another project, I offload to verify api since it handles Telegram/WhatsApp/SMS with fallback and webhooks. Handy if you outgrow single-channel bots.

Posted
14 hours ago, hcastanedar_smr said:

I’m on Emby 4.7.14 (Ubuntu). Plugin’s been solid to a Telegram channel once I messaged the bot first. For covers, I didn’t modify the plugin, I pointed Emby’s webhook to a Node script, wait 30s, fetch /Items/{id}/Images/Primary with an api key, then push to Telegram sendPhoto. That also stopped the filename only pings. On 4.8.0.13 I had to re save my notification rules after upgrade to get events again.
 

In 4.8 the notification system was moved from server to user settings, so that each user can create their own. So that is why upgrading from 4.7 to 4.8 requires you to reconfigure them.

  • 2 weeks later...
darkside40
Posted

Luke has anybody already successfully use this uncommented code snippet which is equal in the Slack and also in the Discord Plugin?

var bytes = await _fileSystem.ReadAllBytesAsync(image.ImageInfo.Path).ConfigureAwait(false);

If i just uncomment it my compiler throws an error: Emby.Plugin.TelegramNotification/Emby.Plugin.TelegramNotification/Notifier.cs(65,71): error CS1061: "ApiImageInfo" enthält keine Definition für "ImageInfo", und es konnte keine zugängliche ImageInfo-Erweiterungsmethode gefunden werden, die ein erstes Argument vom Typ "ApiImageInfo" akze
ptiert (möglicherweise fehlt eine using-Direktive oder ein Assemblyverweis).


Dont know how to switch the dotnet compiler output to english. Seems some using directive is missing, but they are the same as in the examples. 

Posted
1 hour ago, darkside40 said:

Luke has anybody already successfully use this uncommented code snippet which is equal in the Slack and also in the Discord Plugin?

var bytes = await _fileSystem.ReadAllBytesAsync(image.ImageInfo.Path).ConfigureAwait(false);

If i just uncomment it my compiler throws an error: Emby.Plugin.TelegramNotification/Emby.Plugin.TelegramNotification/Notifier.cs(65,71): error CS1061: "ApiImageInfo" enthält keine Definition für "ImageInfo", und es konnte keine zugängliche ImageInfo-Erweiterungsmethode gefunden werden, die ein erstes Argument vom Typ "ApiImageInfo" akze
ptiert (möglicherweise fehlt eine using-Direktive oder ein Assemblyverweis).


Dont know how to switch the dotnet compiler output to english. Seems some using directive is missing, but they are the same as in the examples. 

Hi there, please attach the Emby server log from when the problem occurred:

Thanks!

 

darkside40
Posted

That happens when i try to compile the plugin sourcecode, there is no server log which i could upload.

And i also found out that the other code which would let you fetch the images remotely is not compatible with Emby 4.8.11. Thats known since march but Version 4.8.12 which should fix that is not available. It is fixed in the betas although. Would be great to have some info like that in the sourcecode.

By the way isnt that an Issue that you can enumerate throught the Posters without any API Key etc?

Posted
44 minutes ago, darkside40 said:

That happens when i try to compile the plugin sourcecode, there is no server log which i could upload.

And i also found out that the other code which would let you fetch the images remotely is not compatible with Emby 4.8.11. Thats known since march but Version 4.8.12 which should fix that is not available. It is fixed in the betas although. Would be great to have some info like that in the sourcecode.

By the way isnt that an Issue that you can enumerate throught the Posters without any API Key etc?

Testing a fresh clone of the repo it seems to compile just fine.

darkside40
Posted

I think than the image example in the discord code might be wrong.

darkside40
Posted

Hopefully it works as expected. Had no time (and motivation) for extensive testing.

caffeineshock
Posted
39 minutes ago, darkside40 said:

Hopefully it works as expected. Had no time (and motivation) for extensive testing.

Seems to work. For TV Episode as well as movies.

The only thing im afraid of is adding many TV Episode at once. It will be a spam of Covers and descriptions... But I don't even have a Suggestion on how to handle this... Maybe if the last notification Was from the same TV Show, dont send the Cover? But for this the addon has to remember the Name of the last TV Show 🤔

darkside40
Posted

Honestly that was one of the reasons i hesitated to add this function.

I dont have an idea how to implement this. Afaik the plugin is called everytime a new item is added, that means that series episodes dont have to come in sorted. In the past i used the Notification function of the Playback Reporting Plugin which solved that better if you added much stuff at once.

But if you have an idea, dont hesitate to fork and provide a pull request.

Posted
6 minutes ago, darkside40 said:

Afaik the plugin is called everytime a new item is added, that means that series episodes dont have to come in sorted.

Depends on how the user has configured the notification. That will determine if it's one for each episode or a rollup of the series.

darkside40
Posted

Is that a new feature of the beta?

Posted
19 minutes ago, darkside40 said:

Is that a new feature of the beta?

If I recall I think it was added during a 4.8.X maintenance release.

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...