You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The .nextPage() method provided by the SearchList and also VidoSearchList tends to return videos that have already been fetched in the initial search api call resulting in duplicate videos in the lisitng. Is this the expected beahvaiour or am I doing something wrong?
To Reproduce
Include the code which doesn't work in the code markdown..
Future<VideoModelList> fetchVideosFromExplode(String videoName,
{bool loadMore =false}) async {
try {
final ytExplode =YoutubeExplode();
final searchList =await ytExplode.search.search(videoName);
log('search results from explode $searchList');
log('---------------------------');
if (loadMore) {
final searches =await searchList.nextPage();
if (searches !=null) {
var videosList =VideoModelList.fromJson(searches);
return videosList;
} else {
returnVideoModelList(videoList: []);
}
} else {
var videosList =VideoModelList.fromJson(searchList);
return videosList;
}
} onYoutubeExplodeExceptioncatch (e) {
throwYoutubeExplodeException(e.message);
} catch (e) {
log('video search from explode error $e');
throwServerException();
}
}
Stacktrace
Include here the stacktrace (if applicable).
Enviroment: (please complete the following information):
Enviroment: [Flutter o Dart VM]
Version 3.10.5
YoutubeExplode Version ^2.0.1
The text was updated successfully, but these errors were encountered:
Hi, I've run some tests and I did not get any duplicates videos. Does the error happen with every query or only with some? (if so please provide one). Also, are you able to repruduce the issues in Dart (without running it on flutter)?
Describe the bug
The .nextPage() method provided by the SearchList and also VidoSearchList tends to return videos that have already been fetched in the initial search api call resulting in duplicate videos in the lisitng. Is this the expected beahvaiour or am I doing something wrong?
To Reproduce
Include the code which doesn't work in the code markdown..
Stacktrace
Include here the stacktrace (if applicable).
Enviroment: (please complete the following information):
The text was updated successfully, but these errors were encountered: