@@ -170,7 +170,14 @@ def _manuallyLoadXML(self, xml, cls=None):
170
170
elem = ElementTree .fromstring (xml )
171
171
return self ._buildItemOrNone (elem , cls )
172
172
173
- def fetchItems (self , ekey , cls = None , container_start = None , container_size = None , maxresults = None , ** kwargs ):
173
+ def fetchItems (self ,
174
+ ekey ,
175
+ cls = None ,
176
+ container_start = None ,
177
+ container_size = None ,
178
+ maxresults = None ,
179
+ params = None ,
180
+ ** kwargs ):
174
181
""" Load the specified key to find and build all items with the specified tag
175
182
and attrs.
176
183
@@ -186,6 +193,7 @@ def fetchItems(self, ekey, cls=None, container_start=None, container_size=None,
186
193
container_start (None, int): offset to get a subset of the data
187
194
container_size (None, int): How many items in data
188
195
maxresults (int, optional): Only return the specified number of results.
196
+ params (dict, optional): Any additional params to add to the request.
189
197
**kwargs (dict): Optionally add XML attribute to filter the items.
190
198
See the details below for more info.
191
199
@@ -268,7 +276,7 @@ def fetchItems(self, ekey, cls=None, container_start=None, container_size=None,
268
276
headers ['X-Plex-Container-Start' ] = str (container_start )
269
277
headers ['X-Plex-Container-Size' ] = str (container_size )
270
278
271
- data = self ._server .query (ekey , headers = headers )
279
+ data = self ._server .query (ekey , headers = headers , params = params )
272
280
subresults = self .findItems (data , cls , ekey , ** kwargs )
273
281
total_size = utils .cast (int , data .attrib .get ('totalSize' ) or data .attrib .get ('size' )) or len (subresults )
274
282
0 commit comments