Version 1.2.1
This commit is contained in:
parent
ad2db4c3bb
commit
beb50cb153
|
@ -1,3 +1,8 @@
|
|||
## 1.2.1
|
||||
|
||||
- Fixed `SearchPage.nextPage`.
|
||||
- Added more tests.
|
||||
|
||||
## 1.2.0
|
||||
- Improved documentation.
|
||||
- Deprecated `StreamInfoExt.getHighestBitrate`, use list.`sortByBitrate`.
|
||||
|
@ -5,6 +10,7 @@
|
|||
- 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`.
|
||||
|
||||
|
|
|
@ -136,10 +136,10 @@ class _InitialData {
|
|||
|
||||
Map<String, dynamic> getContinuationContext(Map<String, dynamic> root) {
|
||||
if (_root['contents'] != null) {
|
||||
return _root['contents']['twoColumnSearchResultsRenderer']
|
||||
['primaryContents']['sectionListRenderer']['contents']
|
||||
?.first['itemSectionRenderer']['continuations']
|
||||
?.first
|
||||
return (_root['contents']['twoColumnSearchResultsRenderer']
|
||||
['primaryContents']['sectionListRenderer']['contents']
|
||||
?.first['itemSectionRenderer']['continuations']
|
||||
?.first as Map)
|
||||
?.getValue('nextContinuationData')
|
||||
?.cast<String, dynamic>();
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
name: youtube_explode_dart
|
||||
description: A port in dart of the youtube explode library. Supports several API functions without the need of Youtube API Key.
|
||||
version: 1.2.0+2
|
||||
version: 1.2.1
|
||||
homepage: https://github.com/Hexer10/youtube_explode_dart
|
||||
|
||||
environment:
|
||||
|
|
|
@ -26,5 +26,15 @@ void main() {
|
|||
expect(searchQuery.relatedVideos, isNotEmpty);
|
||||
expect(searchQuery.relatedQueries, isNotEmpty);
|
||||
}, skip: 'This may fail on some environments');
|
||||
|
||||
test('SearchNoResults', () async {
|
||||
var query =
|
||||
await yt.search.queryFromPage('g;jghEOGHJeguEPOUIhjegoUEHGOGHPSASG');
|
||||
expect(query.content, isEmpty);
|
||||
expect(query.relatedQueries, isEmpty);
|
||||
expect(query.relatedVideos, isEmpty);
|
||||
var nextPage = await query.nextPage();
|
||||
expect(nextPage, isNull);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue