MCPcopy
hub / github.com/blacktwin/JBOPS / get_libraries_table

Function get_libraries_table

reporting/added_to_plex.py:134–147  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

132
133
134def get_libraries_table():
135 # Get the data on the Tautulli libraries table.
136 payload = {'apikey': TAUTULLI_APIKEY,
137 'cmd': 'get_libraries_table'}
138
139 try:
140 r = requests.get(TAUTULLI_URL.rstrip('/') + '/api/v2', params=payload)
141 response = r.json()
142
143 res_data = response['response']['data']['data']
144 return [d['section_id'] for d in res_data if d['section_name'] in LIBRARY_NAMES]
145
146 except Exception as e:
147 sys.stderr.write("Tautulli API 'get_libraries_table' request failed: {0}.".format(e))
148
149
150show_lst = []

Callers 1

added_to_plex.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected