mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-08 14:10:52 -07:00
Add helper to cast API parameter true to bool
This commit is contained in:
parent
37d09e9bad
commit
9edbe6af37
4 changed files with 29 additions and 21 deletions
|
@ -1260,6 +1260,14 @@ def mask_config_passwords(config):
|
|||
return config
|
||||
|
||||
|
||||
def bool_true(value):
|
||||
if value is True:
|
||||
return True
|
||||
elif isinstance(value, basestring) and value.lower() in ('1', 'true', 't', 'yes', 'y', 'on'):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def page(endpoint, *args, **kwargs):
|
||||
endpoints = {
|
||||
'pms_image_proxy': pms_image_proxy,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue