mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-06 21:21:15 -07:00
Add all content rating and label filters for guest
This commit is contained in:
parent
2aa059a170
commit
e147ce9039
14 changed files with 599 additions and 220 deletions
|
@ -92,12 +92,18 @@ class DataTables(object):
|
|||
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_)
|
||||
if w_ == None:
|
||||
c_where += w[0] + ' IS NULL OR '
|
||||
else:
|
||||
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 w[1] == None:
|
||||
c_where += w[0] + ' IS NULL 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