From bc6afebed975417f82d5bd7db02ef92c2a3a4483 Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Wed, 15 Sep 2021 10:50:55 -0700 Subject: [PATCH] Add includeGuids parameter when retrieving library results --- plexapi/library.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plexapi/library.py b/plexapi/library.py index d98f684df..c546d7037 100644 --- a/plexapi/library.py +++ b/plexapi/library.py @@ -457,7 +457,7 @@ def get(self, title): Parameters: title (str): Title of the item to return. """ - key = '/library/sections/%s/all?title=%s' % (self.key, quote(title, safe='')) + key = '/library/sections/%s/all?includeGuids=1&title=%s' % (self.key, quote(title, safe='')) return self.fetchItem(key, title__iexact=title) def all(self, libtype=None, **kwargs): @@ -979,6 +979,8 @@ def _buildSearchKey(self, title=None, sort=None, libtype=None, limit=None, filte """ args = {} filter_args = [] + + args['includeGuids'] = int(bool(kwargs.pop('includeGuids', True))) for field, values in list(kwargs.items()): if field.split('__')[-1] not in OPERATORS: filter_args.append(self._validateFilterField(field, values, libtype))