@@ -466,6 +466,12 @@ def settings(self):
466466 data = self ._server .query (key )
467467 return self .findItems (data , cls = Setting )
468468
469+ def timeline (self ):
470+ """ Returns a timeline query for this library section. """
471+ key = '/library/sections/%s/timeline' % self .key
472+ data = self ._server .query (key )
473+ return LibraryTimeline (self , data )
474+
469475 def onDeck (self ):
470476 """ Returns a list of media items on deck from this library section. """
471477 key = '/library/sections/%s/onDeck' % self .key
@@ -1060,6 +1066,46 @@ def _loadData(self, data):
10601066 self .type = data .attrib .get ('type' )
10611067
10621068
1069+ @utils .registerPlexObject
1070+ class LibraryTimeline (PlexObject ):
1071+ """Represents a LibrarySection timeline.
1072+
1073+ Attributes:
1074+ TAG (str): 'LibraryTimeline'
1075+ size (int): Unknown
1076+ allowSync (bool): Unknown
1077+ art (str): Relative path to art image.
1078+ content (str): "secondary"
1079+ identifier (str): "com.plexapp.plugins.library"
1080+ latestEntryTime (int): Epoch timestamp
1081+ mediaTagPrefix (str): "/system/bundle/media/flags/"
1082+ mediaTagVersion (int): Unknown
1083+ thumb (str): Relative path to library thumb image.
1084+ title1 (str): Name of library section.
1085+ updateQueueSize (int): Number of items queued to update.
1086+ viewGroup (str): "secondary"
1087+ viewMode (int): Unknown
1088+ """
1089+ TAG = 'LibraryTimeline'
1090+
1091+ def _loadData (self , data ):
1092+ """ Load attribute values from Plex XML response. """
1093+ self ._data = data
1094+ self .size = utils .cast (int , data .attrib .get ('size' ))
1095+ self .allowSync = utils .cast (bool , data .attrib .get ('allowSync' ))
1096+ self .art = data .attrib .get ('art' )
1097+ self .content = data .attrib .get ('content' )
1098+ self .identifier = data .attrib .get ('identifier' )
1099+ self .latestEntryTime = utils .cast (int , data .attrib .get ('latestEntryTime' ))
1100+ self .mediaTagPrefix = data .attrib .get ('mediaTagPrefix' )
1101+ self .mediaTagVersion = utils .cast (int , data .attrib .get ('mediaTagVersion' ))
1102+ self .thumb = data .attrib .get ('thumb' )
1103+ self .title1 = data .attrib .get ('title1' )
1104+ self .updateQueueSize = utils .cast (int , data .attrib .get ('updateQueueSize' ))
1105+ self .viewGroup = data .attrib .get ('viewGroup' )
1106+ self .viewMode = utils .cast (int , data .attrib .get ('viewMode' ))
1107+
1108+
10631109@utils .registerPlexObject
10641110class Location (PlexObject ):
10651111 """ Represents a single library Location.
0 commit comments