File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -2211,6 +2211,7 @@ class Hub(PlexObject):
2211
2211
items (list): List of items in the hub.
2212
2212
key (str): API URL for the hub.
2213
2213
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.
2214
2215
size (int): The number of items in the hub.
2215
2216
style (str): The style of the hub.
2216
2217
title (str): The title of the hub.
@@ -2227,6 +2228,7 @@ def _loadData(self, data):
2227
2228
self .items = self .findItems (data )
2228
2229
self .key = data .attrib .get ('key' )
2229
2230
self .more = utils .cast (bool , data .attrib .get ('more' ))
2231
+ self .random = utils .cast (bool , data .attrib .get ('random' , '0' ))
2230
2232
self .size = utils .cast (int , data .attrib .get ('size' ))
2231
2233
self .style = data .attrib .get ('style' )
2232
2234
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):
569
569
assert len (hub .items ) == hub .size
570
570
assert utils .is_metadata (hub .key )
571
571
assert hub .more is False
572
+ assert hub .random is False
572
573
assert hub .size == 1
573
574
assert hub .style in (None , "shelf" )
574
575
assert hub .title == "Related Movies"
You can’t perform that action at this time.
0 commit comments