File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2211,6 +2211,7 @@ class Hub(PlexObject):
22112211 items (list): List of items in the hub.
22122212 key (str): API URL for the hub.
22132213 more (bool): True if there are more items to load (call reload() to fetch all items).
2214+ random (bool): True if the items in the hub are randomized.
22142215 size (int): The number of items in the hub.
22152216 style (str): The style of the hub.
22162217 title (str): The title of the hub.
@@ -2227,6 +2228,7 @@ def _loadData(self, data):
22272228 self .items = self .findItems (data )
22282229 self .key = data .attrib .get ('key' )
22292230 self .more = utils .cast (bool , data .attrib .get ('more' ))
2231+ self .random = utils .cast (bool , data .attrib .get ('random' , '0' ))
22302232 self .size = utils .cast (int , data .attrib .get ('size' ))
22312233 self .style = data .attrib .get ('style' )
22322234 self .title = data .attrib .get ('title' )
Original file line number Diff line number Diff line change @@ -569,6 +569,7 @@ def test_video_Movie_hubs(movies):
569569 assert len (hub .items ) == hub .size
570570 assert utils .is_metadata (hub .key )
571571 assert hub .more is False
572+ assert hub .random is False
572573 assert hub .size == 1
573574 assert hub .style in (None , "shelf" )
574575 assert hub .title == "Related Movies"
You can’t perform that action at this time.
0 commit comments