mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-14 09:12:58 -07:00
Fix user and library recently played sorting order
This commit is contained in:
parent
9b3bfd14db
commit
67b452a461
2 changed files with 2 additions and 2 deletions
|
@ -836,7 +836,7 @@ class Libraries(object):
|
||||||
'JOIN session_history ON session_history_metadata.id = session_history.id ' \
|
'JOIN session_history ON session_history_metadata.id = session_history.id ' \
|
||||||
'WHERE section_id = ? ' \
|
'WHERE section_id = ? ' \
|
||||||
'GROUP BY session_history.rating_key ' \
|
'GROUP BY session_history.rating_key ' \
|
||||||
'ORDER BY started DESC LIMIT ?'
|
'ORDER BY MAX(started) DESC LIMIT ?'
|
||||||
result = monitor_db.select(query, args=[section_id, limit])
|
result = monitor_db.select(query, args=[section_id, limit])
|
||||||
else:
|
else:
|
||||||
result = []
|
result = []
|
||||||
|
|
|
@ -602,7 +602,7 @@ class Users(object):
|
||||||
'WHERE user_id = ? ' \
|
'WHERE user_id = ? ' \
|
||||||
'GROUP BY (CASE WHEN session_history.media_type = "track" THEN session_history.parent_rating_key ' \
|
'GROUP BY (CASE WHEN session_history.media_type = "track" THEN session_history.parent_rating_key ' \
|
||||||
' ELSE session_history.rating_key END) ' \
|
' ELSE session_history.rating_key END) ' \
|
||||||
'ORDER BY started DESC LIMIT ?'
|
'ORDER BY MAX(started) DESC LIMIT ?'
|
||||||
result = monitor_db.select(query, args=[user_id, limit])
|
result = monitor_db.select(query, args=[user_id, limit])
|
||||||
else:
|
else:
|
||||||
result = []
|
result = []
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue