File tree Expand file tree Collapse file tree 2 files changed +27
-7
lines changed
lib/src/reverse_engineering/pages Expand file tree Collapse file tree 2 files changed +27
-7
lines changed Original file line number Diff line number Diff line change @@ -157,13 +157,22 @@ class _InitialData extends InitialData {
157
157
? .getT <String >('text' )
158
158
.parseInt ();
159
159
160
- late final String ? continuationToken =
161
- (videosContent ?? playlistVideosContent)
162
- ? .firstWhereOrNull ((e) => e['continuationItemRenderer' ] != null )
163
- ? .get ('continuationItemRenderer' )
164
- ? .get ('continuationEndpoint' )
165
- ? .get ('continuationCommand' )
166
- ? .getT <String >('token' );
160
+ String ? get continuationToken {
161
+ final continuationEndpoint = (videosContent ?? playlistVideosContent)
162
+ ? .firstWhereOrNull ((e) => e['continuationItemRenderer' ] != null )
163
+ ? .get ('continuationItemRenderer' )
164
+ ? .get ('continuationEndpoint' );
165
+
166
+ return continuationEndpoint
167
+ ? .get ('continuationCommand' )
168
+ ? .getT <String >('token' ) ??
169
+ continuationEndpoint
170
+ ? .get ('commandExecutorCommand' )
171
+ ? .getList ('commands' )
172
+ ? .firstWhereOrNull ((e) => e['continuationCommand' ] != null )
173
+ ? .get ('continuationCommand' )
174
+ ? .getT <String >('token' );
175
+ }
167
176
168
177
List <JsonMap >? get playlistVideosContent =>
169
178
root
Original file line number Diff line number Diff line change @@ -56,6 +56,17 @@ void main() {
56
56
expect (videos.length, greaterThan (100 ));
57
57
});
58
58
59
+ test ('Get a shit ton of items from a playlist' , () async {
60
+ final videos = await yt! .playlists
61
+ .getVideos (
62
+ PlaylistId (
63
+ 'https://www.youtube.com/playlist?list=PLI_eFW8NAFzYAXZ5DrU6E6mQ_XfhaLBUX' ,
64
+ ),
65
+ )
66
+ .toList ();
67
+ expect (videos.length, greaterThan (3500 ));
68
+ }, timeout: Timeout (Duration (minutes: 3 )));
69
+
59
70
group ('Get videos in any playlist' , () {
60
71
for (final val in {
61
72
PlaylistId ('PLI5YfMzCfRtZ8eV576YoY3vIYrHjyVm_e' ),
You can’t perform that action at this time.
0 commit comments