mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 07:46:07 -07:00
Add library and user page helper functions
This commit is contained in:
parent
5fad0a1d97
commit
5480d09a0b
15 changed files with 98 additions and 51 deletions
|
@ -1263,7 +1263,9 @@ def mask_config_passwords(config):
|
|||
def page(endpoint, *args, **kwargs):
|
||||
endpoints = {
|
||||
'pms_image_proxy': pms_image_proxy,
|
||||
'info': info_page
|
||||
'info': info_page,
|
||||
'library': library_page,
|
||||
'user': user_page
|
||||
}
|
||||
|
||||
params = {}
|
||||
|
@ -1317,3 +1319,23 @@ def info_page(rating_key=None, guid=None, history=None, live=None):
|
|||
params['source'] = 'history'
|
||||
|
||||
return params
|
||||
|
||||
|
||||
def library_page(section_id=None):
|
||||
params = {}
|
||||
|
||||
if section_id is not None:
|
||||
params['section_id'] = section_id
|
||||
|
||||
return params
|
||||
|
||||
|
||||
def user_page(user_id=None, user=None):
|
||||
params = {}
|
||||
|
||||
if user_id is not None:
|
||||
params['user_id'] = user_id
|
||||
if user is not None:
|
||||
params['user'] = user
|
||||
|
||||
return params
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue