mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 07:46:07 -07:00
Merge pull request #1352 from samwiseg0/fix/watch_stats
Add year to SQL query for movie watch stats
This commit is contained in:
commit
7085042b0d
1 changed files with 2 additions and 2 deletions
|
@ -297,7 +297,7 @@ class DataFactory(object):
|
|||
' >= datetime("now", "-%s days", "localtime") ' \
|
||||
' AND session_history.media_type = "movie" ' \
|
||||
' GROUP BY %s) AS t ' \
|
||||
'GROUP BY t.full_title ' \
|
||||
'GROUP BY t.full_title, t.year ' \
|
||||
'ORDER BY %s DESC, started DESC ' \
|
||||
'LIMIT %s ' % (time_range, group_by, sort_type, stats_count)
|
||||
result = monitor_db.select(query)
|
||||
|
@ -348,7 +348,7 @@ class DataFactory(object):
|
|||
' >= datetime("now", "-%s days", "localtime") ' \
|
||||
' AND session_history.media_type = "movie" ' \
|
||||
' GROUP BY %s) AS t ' \
|
||||
'GROUP BY t.full_title ' \
|
||||
'GROUP BY t.full_title, t.year ' \
|
||||
'ORDER BY users_watched DESC, %s DESC, started DESC ' \
|
||||
'LIMIT %s ' % (time_range, group_by, sort_type, stats_count)
|
||||
result = monitor_db.select(query)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue