Jump to content

Telegram Notifications Plugin


Recommended Posts

Posted

Can you give me a hand getting this to work? 

I already have telegram notifications working with sonarr and radarr. I have the plugin visible under the settings but when I click it:

 

image.thumb.png.302946e2abe597e1219500fa305229ba.png

 

As you can see there's nothing under Configure notifications for: ...

I already tried creating a webhooks notification and restarted but nothing shows up. 

I'm using emby Version 4.8.6.0. 

 

Is this pluging still working with current emby versions? Am I missing something?

Posted
4 hours ago, Veggav said:

Can you give me a hand getting this to work? 

I already have telegram notifications working with sonarr and radarr. I have the plugin visible under the settings but when I click it:

 

image.thumb.png.302946e2abe597e1219500fa305229ba.png

 

As you can see there's nothing under Configure notifications for: ...

I already tried creating a webhooks notification and restarted but nothing shows up. 

I'm using emby Version 4.8.6.0. 

 

Is this pluging still working with current emby versions? Am I missing something?

Hi, notifications config has moved in Emby server 4.8 to the Notifications section under user settings.

  • Like 1
  • 2 months later...
Posted

Hi, I'm using the Telegram Plugin, all notifications I receive keep coming twice:

image.png.10ec79909a2990f3acac31f4e91a1174.png

I'm using the latest (4.8.8.0) Version, but this has been like this quite a while. I also deleted the notification-entry and set it up again, but this did not make any difference. Any hints what to do? Thanks!

Posted
4 hours ago, chstoll said:

Hi, I'm using the Telegram Plugin, all notifications I receive keep coming twice:

image.png.10ec79909a2990f3acac31f4e91a1174.png

I'm using the latest (4.8.8.0) Version, but this has been like this quite a while. I also deleted the notification-entry and set it up again, but this did not make any difference. Any hints what to do? Thanks!

Hi, maybe you added the notifications twice for two different users on the server?

Posted (edited)

Hi, you were right. I didn't realize that the notification setting is a user-setting and not a global setting. I recently changed the main admin user, and the old one still had the notification setting also. Thanks! 

Edited by chstoll
  • Thanks 1
  • 1 month later...
Posted

Hello.
I have managed to install the notifications plugin for Telegram. It works, but it does not send an image.
How can I configure it to send the image?

darkside40
Posted

Not supported. If you want to know why red the thread. I explained it multiple times. 

Posted
1 hour ago, darkside40 said:

Not supported. If you want to know why red the thread. I explained it multiple times. 

If you recall I did provide sample code on how to get the image from within the core server.

 

Posted
On 22/01/2022 at 16:12, darkside40 said:

Talk to @Bodfather with your favorite Telegram Client to create your Telegram Bot

Is there  a typo in your first post ?   "@Bodfather" or "@Botfather" ? In your github repo you do say  "@Botfather"  There is already a @bodfather user in telegram !

  • 1 month later...
Posted

Is it possible to add posters of movies added on telegram notification? 

  • 2 weeks later...
Posted
On 5/13/2024 at 3:00 AM, Luke said:

Hi, notifications config has moved in Emby server 4.8 to the Notifications section under user settings.

Hi, there is no telegram entry in the notification section

Screenshot 2024-10-29 144439.png

Posted
27 minutes ago, AntonioP01 said:

Hi, there is no telegram entry in the notification section

Screenshot 2024-10-29 144439.png

Hi, did you install the plugin?

Posted
Just now, Luke said:

Hi, did you install the plugin?

ok I had the wrong version of the plugin. Now I have another question is there a possibility to add photos to the new content?

Posted
36 minutes ago, AntonioP01 said:

ok I had the wrong version of the plugin. Now I have another question is there a possibility to add photos to the new content?

Hi, hopefully the plugin developer will add support for this.

Posted
5 hours ago, Luke said:

Hi, hopefully the plugin developer will add support for this.

to add texture instead for when adding more than 3 elements?

  • 1 month later...
Posted (edited)
On 29/10/2024 at 17:15, AntonioP01 said:

is there a possibility to add photos to the new content?

So The telegram plugin is so useful but up until now it doesn't post pictures which makes the channel a bit dull and unattractive so I made my own bot which modifies the posted message into this.Screenshot2024-12-03195427.png.efb56b2d570fc0f5520b1c8e01346924.png

I used a python code. and you need telegram bot from Bot father and a TMDB API which is free if you tell them its not for commercial purpose replace  BOT Token with your own bot token and TMDB API with your API. Finally in the code line 141 you have to replace "Dream Server 1" to your emby server name (the one displayed at your dashboard it is Case sensitive) and make the bot ADMIN in the telegram channel and if u have any difficulties contact me. The other issue is the Bot token and the TMDB API is hard coded so u can modify it using environment variable.

def extract_title_and_description(message):
    tv_pattern = r"^New (.+) - S(\d+), Ep(\d+) - (.+) on Dream Server 1(?:\n\n(.*))?$"
    match = re.search(tv_pattern, message, re.DOTALL)
    if match:

 

main.py

 

Edited by Amanade3
  • Thanks 1
  • 2 weeks later...
Posted
On 12/3/2024 at 5:51 PM, Amanade3 said:

So The telegram plugin is so useful but up until now it doesn't post pictures which makes the channel a bit dull and unattractive so I made my own bot which modifies the posted message into this.Screenshot2024-12-03195427.png.efb56b2d570fc0f5520b1c8e01346924.png

I used a python code. and you need telegram bot from Bot father and a TMDB API which is free if you tell them its not for commercial purpose replace  BOT Token with your own bot token and TMDB API with your API. Finally in the code line 141 you have to replace "Dream Server 1" to your emby server name (the one displayed at your dashboard it is Case sensitive) and make the bot ADMIN in the telegram channel and if u have any difficulties contact me. The other issue is the Bot token and the TMDB API is hard coded so u can modify it using environment variable.

def extract_title_and_description(message):
    tv_pattern = r"^New (.+) - S(\d+), Ep(\d+) - (.+) on Dream Server 1(?:\n\n(.*))?$"
    match = re.search(tv_pattern, message, re.DOTALL)
    if match:

 

main.py 11.16 kB · 7 downloads

 

Traceback (most recent call last):
  File "D:\Emby\main.py", line 2, in <module>
    import requests
ModuleNotFoundError: No module named 'requests'

this error comes out, why?

Posted
On 12/3/2024 at 5:51 PM, Amanade3 said:

So The telegram plugin is so useful but up until now it doesn't post pictures which makes the channel a bit dull and unattractive so I made my own bot which modifies the posted message into this.Screenshot2024-12-03195427.png.efb56b2d570fc0f5520b1c8e01346924.png

I used a python code. and you need telegram bot from Bot father and a TMDB API which is free if you tell them its not for commercial purpose replace  BOT Token with your own bot token and TMDB API with your API. Finally in the code line 141 you have to replace "Dream Server 1" to your emby server name (the one displayed at your dashboard it is Case sensitive) and make the bot ADMIN in the telegram channel and if u have any difficulties contact me. The other issue is the Bot token and the TMDB API is hard coded so u can modify it using environment variable.

def extract_title_and_description(message):
    tv_pattern = r"^New (.+) - S(\d+), Ep(\d+) - (.+) on Dream Server 1(?:\n\n(.*))?$"
    match = re.search(tv_pattern, message, re.DOTALL)
    if match:

 

main.py 11.16 kB · 8 downloads

 

Traceback (most recent call last):
  File "D:\main.py", line 4, in <module>
    from telegram import Bot
ModuleNotFoundError: No module named 'telegram'

Now this error

Posted
On 12/3/2024 at 5:51 PM, Amanade3 said:

So The telegram plugin is so useful but up until now it doesn't post pictures which makes the channel a bit dull and unattractive so I made my own bot which modifies the posted message into this.Screenshot2024-12-03195427.png.efb56b2d570fc0f5520b1c8e01346924.png

I used a python code. and you need telegram bot from Bot father and a TMDB API which is free if you tell them its not for commercial purpose replace  BOT Token with your own bot token and TMDB API with your API. Finally in the code line 141 you have to replace "Dream Server 1" to your emby server name (the one displayed at your dashboard it is Case sensitive) and make the bot ADMIN in the telegram channel and if u have any difficulties contact me. The other issue is the Bot token and the TMDB API is hard coded so u can modify it using environment variable.

def extract_title_and_description(message):
    tv_pattern = r"^New (.+) - S(\d+), Ep(\d+) - (.+) on Dream Server 1(?:\n\n(.*))?$"
    match = re.search(tv_pattern, message, re.DOTALL)
    if match:

 

main.py 11.16 kB · 9 downloads

 

2024-12-17 17:34:36,485 - httpx - INFO - HTTP Request: POST https://api.telegram.org/bot7xxxxx5:AxxxxxxxxxxxxxxxxI/getUpdates "HTTP/1.1 200 OK"

this error now?

Posted
On 17/12/2024 at 18:13, AntonioP01 said:

Traceback (most recent call last):
  File "D:\main.py", line 4, in <module>
    from telegram import Bot
ModuleNotFoundError: No module named 'telegram'

it has dependencies go to your python terminal and install telegram library for python and install requests copy and paste these lines without the quotes "pip install python-telegram-bot"  and  "python3 -m pip install requests" make sure your python version is latest at least 3.13 or above if there is one.

 

Posted (edited)
On 17/12/2024 at 19:37, AntonioP01 said:

2024-12-17 17:34:36,485 - httpx - INFO - HTTP Request: POST https://api.telegram.org/bot7xxxxx5:AxxxxxxxxxxxxxxxxI/getUpdates "HTTP/1.1 200 OK"

this error now?

I think this shows that the code is working fine this is not an error just the code waiting for something to be posted on the channel. when new media is added the bot automatically converts and adds picture and stuff. if the code is still not converting the message as expected check these things 1 make sure you edit the API code for emby as well as TMDB api is correct. 2. You need a unique bot other than the one you assigned for the telegram notification and make sure that bot is an admin in the channel. but it seems like your problem lies in you did not modify the code in line 141 for series and line 150 for movies. 

def extract_title_and_description(message):
    tv_pattern = r"^New (.+) - S(\d+), Ep(\d+) - (.+) on Dream Server 1(?:\n\n(.*))?$"
    match = re.search(tv_pattern, message, re.DOTALL)

edit the Dream Server 1 to your emby server name displayed in dashboard (it is case sensitive) e.g in my case like in the picture 

def extract_title_and_description(message):
    tv_pattern = r"^New (.+) - S(\d+), Ep(\d+) - (.+) on Test Server(?:\n\n(.*))?$"
    match = re.search(tv_pattern, message, re.DOTALL)

Screenshot 2024-12-19 184322.png

Edited by Amanade3
  • 2 weeks later...
Posted
On 12/19/2024 at 4:45 PM, Amanade3 said:

I think this shows that the code is working fine this is not an error just the code waiting for something to be posted on the channel. when new media is added the bot automatically converts and adds picture and stuff. if the code is still not converting the message as expected check these things 1 make sure you edit the API code for emby as well as TMDB api is correct. 2. You need a unique bot other than the one you assigned for the telegram notification and make sure that bot is an admin in the channel. but it seems like your problem lies in you did not modify the code in line 141 for series and line 150 for movies. 

def extract_title_and_description(message):
    tv_pattern = r"^New (.+) - S(\d+), Ep(\d+) - (.+) on Dream Server 1(?:\n\n(.*))?$"
    match = re.search(tv_pattern, message, re.DOTALL)

edit the Dream Server 1 to your emby server name displayed in dashboard (it is case sensitive) e.g in my case like in the picture 

def extract_title_and_description(message):
    tv_pattern = r"^New (.+) - S(\d+), Ep(\d+) - (.+) on Test Server(?:\n\n(.*))?$"
    match = re.search(tv_pattern, message, re.DOTALL)

Screenshot 2024-12-19 184322.png

2024-12-31 10:36:42,257 - __main__ - INFO - Channel post text: Nuovo Asphyx in APF SERVER

In Victorian era England, philanthropic scientist Sir Hugo Cunningham is a part of a Parapsychology society that studies psychic phenomena. As part of their latest investigation, the men have begun photographing individuals at the moment of death; done properly, the resultant photos depict a strange smudge hovering around the body. Though the society concludes that they have captured evidence of the soul escaping the body, Cunningham is sceptical.
2024-12-31 10:36:42,258 - __main__ - INFO - Message does not match the expected format. Ignoring...

I get this on python but the photos don't come out on telegram

Posted (edited)

Okay the problem is the language.... the code is written to detect in english like if a message is posted like this e.g New Asphyx on APF SERVER it extracts from tmdb and posts to the channel if any thing else is posted it just ignores and nothing is posted on the channel.....so u can change r"^New to r"^Nuovo for  both movies and series and change on APF SERVER to in APF SERVER .....in the code just like this also apply it to movies 

def extract_title_and_description(message):
    tv_pattern = r"^Nuovo (.+) - S(\d+), Ep(\d+) - (.+) in APF SERVER(?:\n\n(.*))?$"

let me know if this fix this u can try manually by posting this on the channel urself Nuovo Asphyx in APF SERVER 

 

 

Edited by Amanade3
  • 8 months later...
Posted
On 12/3/2024 at 5:51 PM, Amanade3 said:

So The telegram plugin is so useful but up until now it doesn't post pictures which makes the channel a bit dull and unattractive so I made my own bot which modifies the posted message into this.Screenshot2024-12-03195427.png.efb56b2d570fc0f5520b1c8e01346924.png

I used a python code. and you need telegram bot from Bot father and a TMDB API which is free if you tell them its not for commercial purpose replace  BOT Token with your own bot token and TMDB API with your API. Finally in the code line 141 you have to replace "Dream Server 1" to your emby server name (the one displayed at your dashboard it is Case sensitive) and make the bot ADMIN in the telegram channel and if u have any difficulties contact me. The other issue is the Bot token and the TMDB API is hard coded so u can modify it using environment variable.

def extract_title_and_description(message):
    tv_pattern = r"^New (.+) - S(\d+), Ep(\d+) - (.+) on Dream Server 1(?:\n\n(.*))?$"
    match = re.search(tv_pattern, message, re.DOTALL)
    if match:

 

main.py 11.16 kB · 20 downloads

 

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

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