Skip to content

Commit

Permalink
Add includeGuids parameter when retrieving library results
Browse files Browse the repository at this point in the history
  • Loading branch information
JonnyWong16 committed Sep 15, 2021
1 parent 118717e commit bc6afeb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plexapi/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit bc6afeb

Please sign in to comment.