diff --git a/CHANGELOG.md b/CHANGELOG.md index bfc9141..7874e46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ - Implemented `withHighestBitrate` and `sortByBitrate` for `StreamInfo` iterables. - Implemented `withHighestBitrate` for `VideoStreamInfo` iterables. - Now `sortByVideoQuality` returns a List of `T`. - +- `SearchQuery.nextPage` now returns null if there is no next page. ## 1.1.0 - Implement parsing of the search page to retrieve information from youtube searches. See `SearchQuery`. diff --git a/example/video_download_flutter/android/app/build.gradle b/example/video_download_flutter/android/app/build.gradle index bc7e847..2bdbcd9 100644 --- a/example/video_download_flutter/android/app/build.gradle +++ b/example/video_download_flutter/android/app/build.gradle @@ -37,7 +37,6 @@ android { } defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "net.hexah.video_download_flutter" minSdkVersion 16 targetSdkVersion 28 @@ -48,7 +47,6 @@ android { buildTypes { release { - // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. signingConfig signingConfigs.debug } diff --git a/lib/src/reverse_engineering/responses/search_page.dart b/lib/src/reverse_engineering/responses/search_page.dart index 86655a3..5c8c5f5 100644 --- a/lib/src/reverse_engineering/responses/search_page.dart +++ b/lib/src/reverse_engineering/responses/search_page.dart @@ -196,7 +196,7 @@ class _InitialData { } if (content.containsKey('videoRenderer')) { Map renderer = content['videoRenderer']; - //TODO: Add it's a live + //TODO: Add if it's a live return SearchVideo( VideoId(renderer['videoId']), _parseRuns(renderer['title']), diff --git a/lib/src/search/search_query.dart b/lib/src/search/search_query.dart index 4b750ee..a786ffe 100644 --- a/lib/src/search/search_query.dart +++ b/lib/src/search/search_query.dart @@ -22,11 +22,11 @@ class SearchQuery { } /// Get the data of the next page. + /// Returns null if there is no next page. Future nextPage() async { var page = await _page.nextPage(_httpClient); if (page == null) { - // TODO: Throw custom exception - throw Exception('Page limit reached!'); + return null; } return SearchQuery(_httpClient, searchQuery, page); }