File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,21 @@ def test_library_fetchItem(plex, movie):
120
120
assert item1 == item2 == movie
121
121
122
122
123
+ def test_library_fetchItems_with_maxresults (plex ):
124
+ items1 = plex .library .search (libtype = "episode" )
125
+ assert len (items1 ) > 5
126
+ size = len (items1 ) - 5
127
+ ids = [item .key for item in items1 ]
128
+ # Reduce '/library/metadata/123' to '123'
129
+ int_ids = [int (id .rsplit ("/" , 1 )[- 1 ]) for id in ids ]
130
+ items2 = [item .key for item in plex .library .fetchItems (container_size = size , ekey = int_ids )]
131
+ items3 = [item .key for item in plex .library .fetchItems (
132
+ container_size = size , ekey = int_ids , maxresults = len (int_ids )
133
+ )]
134
+ assert len (items2 ) == len (set (items2 ))
135
+ assert len (items3 ) == len (set (items3 ))
136
+
137
+
123
138
def test_library_onDeck (plex , movie ):
124
139
movie .updateProgress (movie .duration // 4 ) # set progress to 25%
125
140
assert movie in plex .library .onDeck ()
You can’t perform that action at this time.
0 commit comments