mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-06 21:21:15 -07:00
Filter all library and user data for guests
This commit is contained in:
parent
d462ebe8e5
commit
c0a5a8d775
13 changed files with 382 additions and 246 deletions
|
@ -89,16 +89,15 @@ class DataTables(object):
|
|||
# Build custom where parameters
|
||||
if custom_where:
|
||||
for w in custom_where:
|
||||
c_where += w[0] + ' = ? AND '
|
||||
|
||||
# The order of our args changes if we are grouping
|
||||
#if grouping:
|
||||
# args.insert(0, w[1])
|
||||
#else:
|
||||
# args.append(w[1])
|
||||
|
||||
# My testing shows that order of args doesn't change
|
||||
args.append(w[1])
|
||||
if isinstance(w[1], (list, tuple)) and len(w[1]):
|
||||
c_where += '('
|
||||
for w_ in w[1]:
|
||||
c_where += w[0] + ' = ? OR '
|
||||
args.append(w_)
|
||||
c_where = c_where.rstrip(' OR ') + ') AND '
|
||||
else:
|
||||
c_where += w[0] + ' = ? AND '
|
||||
args.append(w[1])
|
||||
|
||||
if c_where:
|
||||
c_where = 'WHERE ' + c_where.rstrip(' AND ')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue