potential fix for #208
section id is printed for user to investigate issue
This commit is contained in:
parent
0b6f3c9a6b
commit
ca38dc30a5
@ -155,9 +155,13 @@ def get_ratings_lst(section_id):
|
|||||||
content = sess.get("{}/library/sections/{}/contentRating".format(PLEX_URL, section_id),
|
content = sess.get("{}/library/sections/{}/contentRating".format(PLEX_URL, section_id),
|
||||||
headers=headers, params=params)
|
headers=headers, params=params)
|
||||||
|
|
||||||
ratings_keys = content.json()['MediaContainer']['Directory']
|
try:
|
||||||
ratings_lst = [x['title'] for x in ratings_keys]
|
ratings_keys = content.json()['MediaContainer']['Directory']
|
||||||
return ratings_lst
|
ratings_lst = [x['title'] for x in ratings_keys]
|
||||||
|
return ratings_lst
|
||||||
|
except KeyError:
|
||||||
|
print("Unable to pull ratings from section ID: {}.")
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def filter_clean(filter_type):
|
def filter_clean(filter_type):
|
||||||
|
Loading…
Reference in New Issue
Block a user