I've read the docs and looked at the source code and, please correct me if I am wrong and point me in the right direction, but I did not see a way to get a PlexObject by it's rating key.
I've been using a script to add a label to all recently added items and this works:
headers = {"X-Plex-Token": PLEX_TOKEN}
params = {"type": 1,
"id": rating_key,
"label.locked": 1,
"label[0].tag.tag": LABEL
}
url = "{base_url}/library/sections/{section_id}/all".format(base_url=PLEX_URL, section_id=section_id)
r = requests.put(url, headers=headers, params=params)
I really like this plex api and I would like to be able to get a PlexObject via its rating_key like so:
plex = PlexServer(baseurl, token)
item = plex.library.sectionByID(section_id).get(rating_key)
or
plex = PlexServer(baseurl, token)
item = plex.library.sectionByID(section_id).getByRatingKey(rating_key)
or some way that is in line with your standards.
Please let me know your thoughts. Thanks!
I've read the docs and looked at the source code and, please correct me if I am wrong and point me in the right direction, but I did not see a way to get a PlexObject by it's rating key.
I've been using a script to add a label to all recently added items and this works:
I really like this plex api and I would like to be able to get a PlexObject via its rating_key like so:
or
or some way that is in line with your standards.
Please let me know your thoughts. Thanks!