From 25572d6a5b5dc9d70af81a5f091c39dc442b35ec Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Fri, 2 Oct 2020 23:25:50 -0700 Subject: [PATCH] Change key for plexapi.LibrarySection.collection --- lib/plexapi/library.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/plexapi/library.py b/lib/plexapi/library.py index dec21135..6dd6b504 100644 --- a/lib/plexapi/library.py +++ b/lib/plexapi/library.py @@ -767,7 +767,8 @@ class MovieSection(LibrarySection): def collection(self, **kwargs): """ Returns a list of collections from this library section. """ - return self.search(libtype='collection', **kwargs) + key = '/library/sections/%s/collections' % self.key + return self.fetchItems(key, **kwargs) def playlist(self, **kwargs): """ Returns a list of playlists from this library section. """ @@ -852,7 +853,8 @@ class ShowSection(LibrarySection): def collection(self, **kwargs): """ Returns a list of collections from this library section. """ - return self.search(libtype='collection', **kwargs) + key = '/library/sections/%s/collections' % self.key + return self.fetchItems(key, **kwargs) def playlist(self, **kwargs): """ Returns a list of playlists from this library section. """ @@ -938,7 +940,8 @@ class MusicSection(LibrarySection): def collection(self, **kwargs): """ Returns a list of collections from this library section. """ - return self.search(libtype='collection', **kwargs) + key = '/library/sections/%s/collections' % self.key + return self.fetchItems(key, **kwargs) def playlist(self, **kwargs): """ Returns a list of playlists from this library section. """