1
0
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:
jjlawren
2020-09-03 02:26:30 -05:00
committed by GitHub
parent 49daf57c54
commit d66bc6a873
3 changed files with 126 additions and 5 deletions

View File

@@ -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."""