mirror of
https://github.com/pkkid/python-plexapi
synced 2025-02-16 12:58:26 +00:00
Add convenience method to return filter choice items (#1353)
* Add convenience method to return filter choice items * Add test for filter choice items
This commit is contained in:
parent
36cbcd0a1c
commit
a85291e933
2 changed files with 7 additions and 0 deletions
|
@ -2949,6 +2949,10 @@ class FilterChoice(PlexObject):
|
|||
self.title = data.attrib.get('title')
|
||||
self.type = data.attrib.get('type')
|
||||
|
||||
def items(self):
|
||||
""" Returns a list of items for this filter choice. """
|
||||
return self.fetchItems(self.fastKey)
|
||||
|
||||
|
||||
class ManagedHub(PlexObject):
|
||||
""" Represents a Managed Hub (recommendation) inside a library.
|
||||
|
|
|
@ -551,6 +551,9 @@ def test_library_MovieSection_search_FilterChoice(movies, collection):
|
|||
movie = collection.items()[0]
|
||||
assert movie in results
|
||||
|
||||
items = filterChoice.items()
|
||||
assert movie in items
|
||||
|
||||
|
||||
def test_library_MovieSection_advancedSearch(movies, movie):
|
||||
advancedFilters = {
|
||||
|
|
Loading…
Add table
Reference in a new issue