mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Add Recently Added and On Deck to Plex media browser (#39232)
This commit is contained in:
@@ -346,6 +346,14 @@ class MockPlexLibrary:
|
||||
"""Mock the sectionByID lookup."""
|
||||
return [x for x in self.sections() if x.key == section_id][0]
|
||||
|
||||
def onDeck(self):
|
||||
"""Mock an empty On Deck folder."""
|
||||
return []
|
||||
|
||||
def recentlyAdded(self):
|
||||
"""Mock an empty Recently Added folder."""
|
||||
return []
|
||||
|
||||
|
||||
class MockPlexLibrarySection:
|
||||
"""Mock a Plex LibrarySection instance."""
|
||||
@@ -381,6 +389,14 @@ class MockPlexLibrarySection:
|
||||
if child.ratingKey == ratingKey:
|
||||
return child
|
||||
|
||||
def onDeck(self):
|
||||
"""Mock an empty On Deck folder."""
|
||||
return []
|
||||
|
||||
def recentlyAdded(self):
|
||||
"""Mock an empty Recently Added folder."""
|
||||
return self.all()
|
||||
|
||||
@property
|
||||
def type(self):
|
||||
"""Mock the library type."""
|
||||
|
||||
Reference in New Issue
Block a user