@@ -132,6 +132,8 @@ public void FailPlayer(string videoId, bool contentCheckOk, bool includeHls)
132132 [ TestCase ( "t6cZn-Fvwa0" , Description = "Video with comments disabled" ) ]
133133 [ TestCase ( "jPhJbKBuNnA" , Description = "Video with watchEndpoint in attributedDescription" ) ]
134134 [ TestCase ( "UoBFuLMlDkw" , Description = "Video with more special stuff in attributedDescription" ) ]
135+ [ TestCase ( "llrBX6FpMpM" , Description = "compactMovieRenderer" ) ]
136+ [ TestCase ( "jUUe6TuRlgU" , Description = "Chapters" ) ]
135137 public async Task GetVideoNext ( string videoId )
136138 {
137139 InnerTubeNextResponse next = await _innerTube . GetVideoAsync ( videoId ) ;
@@ -147,24 +149,37 @@ public async Task GetVideoNext(string videoId)
147149 . AppendLine ( "LikeCount: " + next . LikeCount )
148150 . AppendLine ( "Description:\n " + string . Join ( '\n ' , next . Description . Split ( "\n " ) . Select ( x => $ "\t { x } ") ) ) ;
149151
152+ sb . AppendLine ( "\n == CHAPTERS" ) ;
153+ if ( next . Chapters != null )
154+ {
155+ foreach ( ChapterRenderer chapter in next . Chapters )
156+ sb . AppendLine ( $ "- [{ TimeSpan . FromMilliseconds ( chapter . TimeRangeStartMillis ) } ] { chapter . Title } ") ;
157+ }
158+ else
159+ {
160+ sb . AppendLine ( "No chapters available" ) ;
161+ }
162+
150163 sb . AppendLine ( "\n == COMMENTS" )
151164 . AppendLine ( "CommentCount: " + next . CommentCount )
152165 . AppendLine ( "CommentsContinuation: " + next . CommentsContinuation ) ;
153166
154167 sb . AppendLine ( "\n == RECOMMENDED" ) ;
155168 foreach ( IRenderer renderer in next . Recommended )
156169 {
157- sb . AppendLine ( "->\t " + string . Join ( "\n \t " , ( renderer . ToString ( ) ?? "UNKNOWN RENDERER " + renderer . Type ) . Split ( "\n " ) ) ) ;
170+ sb . AppendLine ( "->\t " + string . Join ( "\n \t " ,
171+ ( renderer . ToString ( ) ?? "UNKNOWN RENDERER " + renderer . Type ) . Split ( "\n " ) ) ) ;
158172 }
159-
173+
160174 Assert . Pass ( sb . ToString ( ) ) ;
161175 }
162176
163177 [ TestCase ( "3BR7-AzE2dQ" , "OLAK5uy_l6pEkEJgy577R-aDlJ3Gkp5rmlgIOu8bc" , null , null ) ]
164178 [ TestCase ( "o0tky2O8NlY" , "OLAK5uy_l6pEkEJgy577R-aDlJ3Gkp5rmlgIOu8bc" , null , null ) ]
165179 [ TestCase ( "NZwS7Cja6oE" , "PLv3TTBr1W_9tppikBxAE_G6qjWdBljBHJ" , null , null ) ]
166180 [ TestCase ( "k_nLHgIM4yE" , "PLv3TTBr1W_9tppikBxAE_G6qjWdBljBHJ" , null , null ) ]
167- public async Task GetVideoNextWithPlaylist ( string videoId , string playlistId , int ? playlistIndex , string ? playlistParams )
181+ public async Task GetVideoNextWithPlaylist ( string videoId , string playlistId , int ? playlistIndex ,
182+ string ? playlistParams )
168183 {
169184 InnerTubeNextResponse next = await _innerTube . GetVideoAsync ( videoId , playlistId , playlistIndex , playlistParams ) ;
170185 if ( next . Playlist is null )
@@ -190,7 +205,7 @@ public async Task GetVideoNextWithPlaylist(string videoId, string playlistId, in
190205
191206 Assert . Pass ( sb . ToString ( ) ) ;
192207 }
193-
208+
194209 [ TestCase ( "1234567890a" , Description = "An ID I just made up" ) ]
195210 [ TestCase ( "a62882basgl" , Description = "Another ID I just made up" ) ]
196211 [ TestCase ( "32nkdvLq3oQ" , Description = "A deleted video" ) ]
@@ -214,8 +229,12 @@ public async Task DontGetVideoNext(string videoId)
214229 }
215230
216231 [ TestCase ( "BaW_jenozKc" , Description = "Regular video comments" ) ]
217- [ TestCase ( "Eg0SC3F1STZnNEhwZVBjGAYyVSIuIgtxdUk2ZzRIcGVQYzAAeAKqAhpVZ3p3MnBIQXR1VW9xamRLbUtWNEFhQUJBZzABQiFlbmdhZ2VtZW50LXBhbmVsLWNvbW1lbnRzLXNlY3Rpb24%3D" , Description = "Contains pinned & hearted comments" ) ]
218- [ TestCase ( "Eg0SC2tZd0Ita1p5TlU0GAYyJSIRIgtrWXdCLWtaeU5VNDAAeAJCEGNvbW1lbnRzLXNlY3Rpb24%3D" , Description = "Contains authors with badges" ) ]
232+ [ TestCase (
233+ "Eg0SC3F1STZnNEhwZVBjGAYyVSIuIgtxdUk2ZzRIcGVQYzAAeAKqAhpVZ3p3MnBIQXR1VW9xamRLbUtWNEFhQUJBZzABQiFlbmdhZ2VtZW50LXBhbmVsLWNvbW1lbnRzLXNlY3Rpb24%3D" ,
234+ Description = "Contains pinned & hearted comments" ) ]
235+ [ TestCase ( "Eg0SC2tZd0Ita1p5TlU0GAYyJSIRIgtrWXdCLWtaeU5VNDAAeAJCEGNvbW1lbnRzLXNlY3Rpb24%3D" ,
236+ Description = "Contains authors with badges" ) ]
237+ [ TestCase ( "5UCz9i2K9gY" , Description = "Has unescaped HTML tags" ) ]
219238 public async Task GetVideoComments ( string videoId )
220239 {
221240 InnerTubeContinuationResponse comments ;
@@ -229,6 +248,7 @@ public async Task GetVideoComments(string videoId)
229248 {
230249 comments = await _innerTube . GetVideoCommentsAsync ( videoId ! ) ;
231250 }
251+
232252 StringBuilder sb = new ( ) ;
233253
234254 foreach ( IRenderer renderer in comments . Contents ) sb . AppendLine ( renderer . ToString ( ) ) ;
0 commit comments