@@ -529,15 +529,13 @@ def search(self, title=None, sort=None, maxresults=999999, libtype=None, **kwarg
529529 # cleanup the core arguments
530530 args = {}
531531 for category , value in kwargs .items ():
532- log .info ("ttt %s %s" ,category , value )
533532 args [category ] = self ._cleanSearchFilter (category , value , libtype )
534533 if title is not None :
535534 args ['title' ] = title
536535 if sort is not None :
537536 args ['sort' ] = self ._cleanSearchSort (sort )
538537 if libtype is not None :
539538 args ['type' ] = utils .searchType (libtype )
540- log .info ("ass %s" , self .key )
541539 # iterate over the results
542540 results , subresults = [], '_init'
543541 args ['X-Plex-Container-Start' ] = 0
@@ -1018,9 +1016,11 @@ class Collections(PlexObject):
10181016
10191017 TAG = 'Directory'
10201018 TYPE = 'collection'
1019+ _include = "?includeExternalMedia=1&includePreferences=1"
10211020
10221021 def _loadData (self , data ):
10231022 self .ratingKey = utils .cast (int , data .attrib .get ('ratingKey' ))
1023+ self ._details_key = "/library/metadata/%s%s" % (self .ratingKey , self ._include )
10241024 self .key = data .attrib .get ('key' )
10251025 self .type = data .attrib .get ('type' )
10261026 self .title = data .attrib .get ('title' )
@@ -1040,13 +1040,6 @@ def _loadData(self, data):
10401040 def children (self ):
10411041 return self .fetchItems (self .key )
10421042
1043- def reload (self , key = None ):
1044- return self .fetchItem (int (self .ratingKey ))
1045- #return self.reload(key=self._initpath)
1046- res = self .fetchItems (self ._initpath )
1047- if len (res ):
1048- return [i for i in res if i .ratingKey == self .ratingKey ][0 ]
1049-
10501043 def __len__ (self ):
10511044 return self .childCount
10521045
@@ -1075,7 +1068,6 @@ def modeUpdate(self, mode=None):
10751068 if key is None :
10761069 raise BadRequest ('Unknown collection mode : %s. Options %s' % (mode , list (mode_dict )))
10771070 part = '/library/metadata/%s/prefs?collectionMode=%s' % (self .ratingKey , key )
1078- log .info ("ffs part key %s" , part )
10791071 return self ._server .query (part , method = self ._server ._session .put )
10801072
10811073 def sortUpdate (self , sort = None ):
0 commit comments