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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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."""