Skip to content

Commit baabcbc

Browse files
authored
update for ALLOWED_FILTERS
updated ALLOWED_FILTERS for Movies, Shows, and Photos sections.
1 parent 39b90da commit baabcbc

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

plexapi/library.py

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,8 @@ class MovieSection(LibrarySection):
649649
"""
650650
ALLOWED_FILTERS = ('unwatched', 'duplicate', 'year', 'decade', 'genre', 'contentRating',
651651
'collection', 'director', 'actor', 'country', 'studio', 'resolution',
652-
'guid', 'label')
652+
'guid', 'label', 'writer', 'producer', 'subtitleLanguage', 'audioLanguage',
653+
'lastViewedAt', 'viewCount', 'addedAt')
653654
ALLOWED_SORT = ('addedAt', 'originallyAvailableAt', 'lastViewedAt', 'titleSort', 'rating',
654655
'mediaHeight', 'duration')
655656
TAG = 'Directory'
@@ -709,7 +710,11 @@ class ShowSection(LibrarySection):
709710
TYPE (str): 'show'
710711
"""
711712
ALLOWED_FILTERS = ('unwatched', 'year', 'genre', 'contentRating', 'network', 'collection',
712-
'guid', 'duplicate', 'label')
713+
'guid', 'duplicate', 'label', 'show.title', 'show.year', 'show.userRating',
714+
'show.viewCount', 'show.lastViewedAt', 'show.actor', 'show.addedAt', 'episode.title',
715+
'episode.originallyAvailableAt', 'episode.resolution', 'episode.subtitleLanguage',
716+
'episode.unwatched', 'episode.addedAt','episode.userRating', 'episode.viewCount',
717+
'episode.lastViewedAt')
713718
ALLOWED_SORT = ('addedAt', 'lastViewedAt', 'originallyAvailableAt', 'titleSort',
714719
'rating', 'unwatched')
715720
TAG = 'Directory'
@@ -784,7 +789,12 @@ class MusicSection(LibrarySection):
784789
TAG (str): 'Directory'
785790
TYPE (str): 'artist'
786791
"""
787-
ALLOWED_FILTERS = ('genre', 'country', 'collection', 'mood', 'year', 'track.userRating')
792+
ALLOWED_FILTERS = ('genre', 'country', 'collection', 'mood', 'year', 'track.userRating', 'artist.title',
793+
'artist.userRating', 'artist.genre', 'artist.country', 'artist.collection', 'artist.addedAt',
794+
'album.title', 'album.userRating', 'album.genre', 'album.decade', 'album.collection',
795+
'album.viewCount', 'album.lastViewedAt', 'album.studio', 'album.addedAt', 'track.title',
796+
'track.userRating', 'track.viewCount', 'track.lastViewedAt', 'track.skipCount',
797+
'track.lastSkippedAt')
788798
ALLOWED_SORT = ('addedAt', 'lastViewedAt', 'viewCount', 'titleSort', 'userRating')
789799
TAG = 'Directory'
790800
TYPE = 'artist'
@@ -858,7 +868,8 @@ class PhotoSection(LibrarySection):
858868
TAG (str): 'Directory'
859869
TYPE (str): 'photo'
860870
"""
861-
ALLOWED_FILTERS = ('all', 'iso', 'make', 'lens', 'aperture', 'exposure', 'device', 'resolution')
871+
ALLOWED_FILTERS = ('all', 'iso', 'make', 'lens', 'aperture', 'exposure', 'device', 'resolution', 'place',
872+
'originallyAvailableAt', 'addedAt', 'title', 'userRating')
862873
ALLOWED_SORT = ('addedAt',)
863874
TAG = 'Directory'
864875
TYPE = 'photo'

0 commit comments

Comments
 (0)