mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 15:56:07 -07:00
parent
f7fc16a1d8
commit
c6548c80b3
2 changed files with 3 additions and 2 deletions
|
@ -659,7 +659,8 @@ class DataFactory(object):
|
||||||
' FROM session_history ' \
|
' FROM session_history ' \
|
||||||
' WHERE session_history.stopped >= %s ' \
|
' WHERE session_history.stopped >= %s ' \
|
||||||
' GROUP BY %s) AS sh ' \
|
' GROUP BY %s) AS sh ' \
|
||||||
'LEFT OUTER JOIN library_sections AS ls ON sh.section_id = ls.section_id ' \
|
'LEFT OUTER JOIN (SELECT * FROM library_sections WHERE deleted_section = 0) ' \
|
||||||
|
' AS ls ON sh.section_id = ls.section_id ' \
|
||||||
'GROUP BY sh.section_id ' \
|
'GROUP BY sh.section_id ' \
|
||||||
'ORDER BY %s DESC, sh.started DESC ' \
|
'ORDER BY %s DESC, sh.started DESC ' \
|
||||||
'LIMIT %s OFFSET %s ' % (timestamp, group_by, sort_type, stats_count, stats_start)
|
'LIMIT %s OFFSET %s ' % (timestamp, group_by, sort_type, stats_count, stats_start)
|
||||||
|
|
|
@ -1099,7 +1099,7 @@ class Libraries(object):
|
||||||
if row_ids and row_ids is not None:
|
if row_ids and row_ids is not None:
|
||||||
row_ids = list(map(helpers.cast_to_int, row_ids.split(',')))
|
row_ids = list(map(helpers.cast_to_int, row_ids.split(',')))
|
||||||
|
|
||||||
# Get the user_ids corresponding to the row_ids
|
# Get the section_ids corresponding to the row_ids
|
||||||
result = monitor_db.select('SELECT server_id, section_id FROM library_sections '
|
result = monitor_db.select('SELECT server_id, section_id FROM library_sections '
|
||||||
'WHERE id IN ({})'.format(','.join(['?'] * len(row_ids))), row_ids)
|
'WHERE id IN ({})'.format(','.join(['?'] * len(row_ids))), row_ids)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue