Skip to content

Commit bc6afeb

Browse files
committed
Add includeGuids parameter when retrieving library results
1 parent 118717e commit bc6afeb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

plexapi/library.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ def get(self, title):
457457
Parameters:
458458
title (str): Title of the item to return.
459459
"""
460-
key = '/library/sections/%s/all?title=%s' % (self.key, quote(title, safe=''))
460+
key = '/library/sections/%s/all?includeGuids=1&title=%s' % (self.key, quote(title, safe=''))
461461
return self.fetchItem(key, title__iexact=title)
462462

463463
def all(self, libtype=None, **kwargs):
@@ -979,6 +979,8 @@ def _buildSearchKey(self, title=None, sort=None, libtype=None, limit=None, filte
979979
"""
980980
args = {}
981981
filter_args = []
982+
983+
args['includeGuids'] = int(bool(kwargs.pop('includeGuids', True)))
982984
for field, values in list(kwargs.items()):
983985
if field.split('__')[-1] not in OPERATORS:
984986
filter_args.append(self._validateFilterField(field, values, libtype))

0 commit comments

Comments
 (0)