diff --git a/CHANGELOG.md b/CHANGELOG.md index 5cfb050..c2e47b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 1.9.2+1 +- Implement `videoThumbnail` in `ChannelVideo`. + ## 1.9.2 - Implement `videoDuration` in `ChannelVideo`. diff --git a/lib/src/channels/channel_video.dart b/lib/src/channels/channel_video.dart index 954d7ae..3e9adc9 100644 --- a/lib/src/channels/channel_video.dart +++ b/lib/src/channels/channel_video.dart @@ -12,8 +12,11 @@ class ChannelVideo with EquatableMixin { /// Video duration final Duration videoDuration; + /// Video thumbnail + final String videoThumbnail; + /// Initialize an instance of [ChannelVideo] - ChannelVideo(this.videoId, this.videoTitle, this.videoDuration); + ChannelVideo(this.videoId, this.videoTitle, this.videoDuration, this.videoThumbnail); @override String toString() => '[ChannelVideo] $videoTitle ($videoId)'; diff --git a/lib/src/reverse_engineering/responses/channel_upload_page.dart b/lib/src/reverse_engineering/responses/channel_upload_page.dart index 8b115eb..5a395c2 100644 --- a/lib/src/reverse_engineering/responses/channel_upload_page.dart +++ b/lib/src/reverse_engineering/responses/channel_upload_page.dart @@ -174,7 +174,13 @@ class _InitialData { ?.get('text') ?.getT('simpleText') ?.toDuration() ?? - Duration.zero); + Duration.zero, + video + .get('thubnail') + ?.getList('thumbnails') + ?.last + .getT('url') ?? + ''); } } diff --git a/pubspec.yaml b/pubspec.yaml index 198a639..75d284e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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.9.2 +version: 1.9.2+1 homepage: https://github.com/Hexer10/youtube_explode_dart