Jump to content


Photo

Extend Emby Notifications


  • Please log in to reply
19 replies to this topic

#1 darkside40 OFFLINE  

darkside40

    Advanced Member

  • Members
  • 87 posts
  • Local time: 04:20 AM

Posted 25 March 2020 - 05:21 PM

Would it be possible to extend the send by Emby?

Till now when a new Iten is added Emby only sends the Name (if it works) and the Description.

Would it be possible that Emby sends for example also the IMDB, TVDB ID's or an image path for further processing?



#2 rechigo OFFLINE  

rechigo

    Advanced Member

  • Members
  • 567 posts
  • Local time: 07:20 PM
  • LocationCALIFORNIA

Posted 25 March 2020 - 05:24 PM

I think It shoulfld send the BaseItem itself containing all available metadata/images on the item

Sent from my SM-G973U using Tapatalk

#3 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 153190 posts
  • Local time: 10:20 PM

Posted 25 March 2020 - 08:58 PM

I think the likely future of notifications is that once we have notification options built into the mobile apps, that's going to cause mass confusion between that and the notification system built into the server.

 

Therefore I think the best course of action will be that the notification plugins are no longer controlled by a core notification system, which will them free them up to do more of what they want and not be limited to the lowest common demonstrator of all the plugins.



#4 rechigo OFFLINE  

rechigo

    Advanced Member

  • Members
  • 567 posts
  • Local time: 07:20 PM
  • LocationCALIFORNIA

Posted 25 March 2020 - 09:01 PM



Therefore I think the best course of action will be that the notification plugins are no longer controlled by a core notification system, which will them free them up to do more of what they want and not be limited to the lowest common demonstrator of all the plugins.


Like how your Webhooks plugin has the notification settingsnin the plugin page rather than using the core notificationbsystem?

Sent from my SM-G973U using Tapatalk

#5 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 153190 posts
  • Local time: 10:20 PM

Posted 25 March 2020 - 09:13 PM

Yea I think we should drop the core notification system and just let the plugins self-manage themselves. It's confusing for users to have to go to two places to set it all up. 

 

It will mean more code for the plugins but i think it is the right move. When the time comes i will convert all of the existing ones so that will give you sample code.



#6 rechigo OFFLINE  

rechigo

    Advanced Member

  • Members
  • 567 posts
  • Local time: 07:20 PM
  • LocationCALIFORNIA

Posted 25 March 2020 - 09:20 PM

Yea I think we should drop the core notification system and just let the plugins self-manage themselves. It's confusing for users to have to go to two places to set it all up.

It will mean more code for the plugins but i think it is the right move. When the time comes i will convert all of the existing ones so that will give you sample code.

Wouldn't dropping the notification system also take away the ability of other plugins sending their own notifications? There are a couple that have their own custom notifications

Sent from my SM-G973U using Tapatalk

#7 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 153190 posts
  • Local time: 10:20 PM

Posted 25 March 2020 - 09:30 PM

It wouldn't take away anything. They would just have to subscribe to internal system events on their own rather than having a notifications framework invoke them.



#8 darkside40 OFFLINE  

darkside40

    Advanced Member

  • Members
  • 87 posts
  • Local time: 04:20 AM

Posted 26 March 2020 - 03:18 AM

Which would effectively mean to hand over the work for a proper Notification Framework from the Core Team to the Plugin Developers so they all have to create their own ways in retrieving the data.

Combined with the not really existing plugin developement documentation i dont know if that is the way to go. 



#9 rechigo OFFLINE  

rechigo

    Advanced Member

  • Members
  • 567 posts
  • Local time: 07:20 PM
  • LocationCALIFORNIA

Posted 26 March 2020 - 03:24 AM

Which would effectively mean to hand over the work for a proper Notification Framework from the Core Team to the Plugin Developers so they all have to create their own ways in retrieving the data.
Combined with the not really existing plugin developement documentation i dont know if that is the way to go.

I agree. Before we start offloading core functionality to plugin developers, they should have a working documentation. The docs haven't been updated in years. The only way to get documentation is to Right Click the interface > go to declaration to view all properties and methods. Today I found something useful: the Jellyfin plugin documentation. It's not exactly identical, it probably doesn't contain all the Emby interfaces, but its magnitudes better than Emby's current documentation: https://github.com/j...aster/README.md

Sent from my SM-G973U using Tapatalk

#10 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 153190 posts
  • Local time: 10:20 PM

Posted 27 March 2020 - 10:31 AM

It is just one idea. I will figure it out when the time comes.



#11 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 153190 posts
  • Local time: 10:20 PM

Posted 27 March 2020 - 10:32 AM

We have plugin documentation here:

https://github.com/M...a-Server-Plugin



#12 rechigo OFFLINE  

rechigo

    Advanced Member

  • Members
  • 567 posts
  • Local time: 07:20 PM
  • LocationCALIFORNIA

Posted 27 March 2020 - 01:07 PM

We have plugin documentation here:
https://github.com/M...a-Server-Plugin

Yes but it is very lackluster and is missing tons of interfaces and examples

It's enough to get you started, but once you want to explore the API further it can be difficult to find things

Sent from my SM-G973U using Tapatalk

Edited by rechigo, 27 March 2020 - 01:08 PM.


#13 darkside40 OFFLINE  

darkside40

    Advanced Member

  • Members
  • 87 posts
  • Local time: 04:20 AM

Posted 28 March 2020 - 05:25 AM

Thats the reason why there are so many plugins which are simply based upon other plugins.

This is the case with nearly all Notification Plugins, they are mainly based on the E-Mail plugin.

 

Due to the lacking documentation it is nearly impossible for any non-fulltime software developer to do plugins for Emby. Sad but true.



#14 rafinha OFFLINE  

rafinha

    Advanced Member

  • Members
  • 76 posts
  • Local time: 10:20 PM

Posted 28 March 2020 - 09:02 AM

The good thing about Webhooks, is for people that are not C# developer.

Example, I. I can do the service using the language that I want like Typescript, and let webhook fire events to my service.

 

I believe if we go to this way, we will have way more plugins for Emby.



#15 darkside40 OFFLINE  

darkside40

    Advanced Member

  • Members
  • 87 posts
  • Local time: 04:20 AM

Posted 28 March 2020 - 10:10 AM

But if i recall it correctly for using Webhooks your Emby Server needs to be reachable from the internet. Correct me if i am wrong.



#16 rafinha OFFLINE  

rafinha

    Advanced Member

  • Members
  • 76 posts
  • Local time: 10:20 PM

Posted 28 March 2020 - 10:26 AM

But if i recall it correctly for using Webhooks your Emby Server needs to be reachable from the internet. Correct me if i am wrong.

 

Not really, right now I'm creating my service using docker... so I just point the webhook url to my docker container http://192.168.2.30/test



#17 darkside40 OFFLINE  

darkside40

    Advanced Member

  • Members
  • 87 posts
  • Local time: 04:20 AM

Posted 28 March 2020 - 05:13 PM

Problem is that there is no Webhook for New Media available.



#18 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 153190 posts
  • Local time: 10:20 PM

Posted 28 March 2020 - 05:25 PM

That can be added.



#19 darkside40 OFFLINE  

darkside40

    Advanced Member

  • Members
  • 87 posts
  • Local time: 04:20 AM

Posted 29 March 2020 - 09:45 AM

So infact that would mean i write an external application for example in Python that waits for the notification made by the Emby Server via the Webhook when new media is added. After that my application would connect to the Emby Server via its api and takes all the info that is needed to send for example an info enriched Telegram Message.

 

Good concept the only downside i would say is that this is harder to install for most users than a plain Emby plugin.



#20 rafinha OFFLINE  

rafinha

    Advanced Member

  • Members
  • 76 posts
  • Local time: 10:20 PM

Posted 29 March 2020 - 10:20 AM

So for telegram, what I want to do:

 

1. Receive from webhook

2. Format the message the way I want, message + thumb (right now, because emby has a limited info, I parse the info and search in emby api or themoviedb api)

3. Send to Telegram/Discord/Facebook/Whatsapp bot using their api

 

Yeah maybe for the people that don't create as service like me, using docker is not the ideal, but for my scenario is just perfect.

 

Anyway, is the way that webhooks works, i guess for the people that don't want use it as webhook, they still can work with plugins.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users