Version 1.10.4
- Fix infinite loop when getting channel uploads.
This commit is contained in:
parent
cc1193a26c
commit
4bb032f2f6
|
@ -1,3 +1,6 @@
|
||||||
|
## 1.10.4
|
||||||
|
- Fix infinite loop when getting channel uploads.
|
||||||
|
|
||||||
## 1.10.3
|
## 1.10.3
|
||||||
- Implement Embedded client. Thanks to @89z
|
- Implement Embedded client. Thanks to @89z
|
||||||
|
|
||||||
|
|
|
@ -36,35 +36,6 @@ class PlaylistClient {
|
||||||
|
|
||||||
PlaylistPage? page = await PlaylistPage.get(_httpClient, id.value);
|
PlaylistPage? page = await PlaylistPage.get(_httpClient, id.value);
|
||||||
|
|
||||||
for (final video in page.videos) {
|
|
||||||
var videoId = video.id;
|
|
||||||
|
|
||||||
// Already added
|
|
||||||
if (!encounteredVideoIds.add(videoId)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (video.channelId.isEmpty) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
yield Video(
|
|
||||||
VideoId(videoId),
|
|
||||||
video.title,
|
|
||||||
video.author,
|
|
||||||
ChannelId(video.channelId),
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
video.description,
|
|
||||||
video.duration,
|
|
||||||
ThumbnailSet(videoId),
|
|
||||||
null,
|
|
||||||
Engagement(video.viewCount, null, null),
|
|
||||||
false);
|
|
||||||
}
|
|
||||||
|
|
||||||
page = await page.nextPage(_httpClient);
|
|
||||||
|
|
||||||
while (page != null) {
|
while (page != null) {
|
||||||
for (final video in page.videos) {
|
for (final video in page.videos) {
|
||||||
var videoId = video.id;
|
var videoId = video.id;
|
||||||
|
@ -92,6 +63,7 @@ class PlaylistClient {
|
||||||
Engagement(video.viewCount, null, null),
|
Engagement(video.viewCount, null, null),
|
||||||
false);
|
false);
|
||||||
}
|
}
|
||||||
|
page = await page.nextPage(_httpClient);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
name: youtube_explode_dart
|
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.
|
description: A port in dart of the youtube explode library. Supports several API functions without the need of Youtube API Key.
|
||||||
version: 1.10.3
|
version: 1.10.4
|
||||||
|
|
||||||
homepage: https://github.com/Hexer10/youtube_explode_dart
|
homepage: https://github.com/Hexer10/youtube_explode_dart
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue