From 0949bb13c1119a638da358793f6342c12b89e922 Mon Sep 17 00:00:00 2001 From: Mattia Date: Sun, 18 Jul 2021 16:12:31 +0200 Subject: [PATCH] Typo's & [watchPage] annotation --- lib/src/videos/comments/comments_client.dart | 5 ++--- lib/src/videos/video.dart | 2 ++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/src/videos/comments/comments_client.dart b/lib/src/videos/comments/comments_client.dart index ff3101c..c46980d 100644 --- a/lib/src/videos/comments/comments_client.dart +++ b/lib/src/videos/comments/comments_client.dart @@ -37,7 +37,7 @@ class CommentsClient { return retry(() async { var raw = await _httpClient.postString(url, headers: { - 'x-youtube-client-namE': '1', + 'x-youtube-client-name': '1', 'x-youtube-client-version': '2.20210622.10.00', 'cookie': 'YSC=$ysc; CONSENT=YES+cb; GPS=1; VISITOR_INFO1_LIVE=$visitorInfoLive', @@ -99,7 +99,7 @@ class CommentsClient { clickTrackingParams = continuationData.getT('clickTrackingParams'); } - var comment = Comment( + yield Comment( commentRaw.getT('commentId')!, commentRaw.get('authorText')!.getT('simpleText')!, ChannelId(commentRaw @@ -124,7 +124,6 @@ class CommentsClient { commentRaw.getT('replyCount') ?? 0, continuation, clickTrackingParams); - yield comment; } var continuationRoot = (data .get('response') diff --git a/lib/src/videos/video.dart b/lib/src/videos/video.dart index bce95a5..e20c29d 100644 --- a/lib/src/videos/video.dart +++ b/lib/src/videos/video.dart @@ -1,6 +1,7 @@ import 'dart:collection'; import 'package:equatable/equatable.dart'; +import 'package:meta/meta.dart'; import '../channels/channel_id.dart'; import '../common/common.dart'; @@ -52,6 +53,7 @@ class Video with EquatableMixin { /// Used internally. /// Shouldn't be used in the code. + @internal final WatchPage? watchPage; /// Returns true if the watch page is available for this video.