mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-26 13:40:22 +00:00
use fetchItem and fetchItems instead of query
This commit is contained in:
parent
ad2de7c9a6
commit
2da4d2bf68
1 changed files with 2 additions and 8 deletions
|
@ -366,15 +366,9 @@ class PlexServer(PlexObject):
|
|||
|
||||
def optimizedItems(self):
|
||||
""" Returns list of all :class:`~plexapi.media.Optimized` objects connected to server. """
|
||||
items = []
|
||||
|
||||
backgroundProcessing = self.query('/playlists?type=42')
|
||||
for elem in backgroundProcessing:
|
||||
key = elem.attrib.get('key')
|
||||
for elem in self.query(key):
|
||||
items.append(Optimized(server=self, data=elem))
|
||||
|
||||
return items
|
||||
backgroundProcessing = self.fetchItem('/playlists?type=42')
|
||||
return self.fetchItems('%s/items' % backgroundProcessing.key, cls=Optimized)
|
||||
|
||||
def conversions(self):
|
||||
""" Returns list of all :class:`~plexapi.media.Conversion` objects connected to server. """
|
||||
|
|
Loading…
Reference in a new issue