Posts: 2
Joined: Dec 2015
Reputation:
0
2015-12-03, 19:59
(This post was last modified: 2015-12-04, 08:36 by bluelemon.)
Hello, from an add-on is there a way to receive an event when a favourite is added or removed ? thxs.
Posts: 359
Joined: Jan 2014
Reputation:
18
can you elaborate a bit more? I have done add/remove favorite in one of my addon.
Posts: 2
Joined: Dec 2015
Reputation:
0
2015-12-04, 07:20
(This post was last modified: 2015-12-04, 10:18 by bluelemon.)
I would like to write an add-on which when a user add/delete a favourite would call an url. subscription management to receive an email when new content is added to that favourite.
Posts: 1,483
Joined: Aug 2010
2015-12-04, 10:57
(This post was last modified: 2015-12-04, 11:06 by Robotica.)
Database triggers aren't implemented in Kodi. Takoi's
watchdog addon is closests what you get. So writing custom crud events on the favorite table with python is the most easy solution.
Making this a generic solution would be a killer addon. It would get rid of many addons if users can setup if-this-than-that scenario's. Having those triggers on filesystem (sysevents and polling) and database level (CRUD) would give endless possibilities with your library.