mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-07 21:51:14 -07:00
Rework notify_log table to save each notification separately
This commit is contained in:
parent
3c6a6cdc5b
commit
c93b65b299
3 changed files with 231 additions and 147 deletions
|
@ -860,8 +860,9 @@ class DataFactory(object):
|
|||
monitor_db = database.MonitorDatabase()
|
||||
|
||||
if rating_key:
|
||||
query = 'SELECT id, poster_url FROM notify_log WHERE rating_key = %d ' \
|
||||
'ORDER BY id DESC LIMIT 1' % int(rating_key)
|
||||
query = 'SELECT id, poster_url FROM notify_log ' \
|
||||
'WHERE rating_key = %d OR parent_rating_key = %d OR grandparent_rating_key = %d ' \
|
||||
'ORDER BY id DESC LIMIT 1' % (int(rating_key), int(rating_key), int(rating_key))
|
||||
result = monitor_db.select(query)
|
||||
else:
|
||||
return None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue