File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -135,11 +135,9 @@ private static PipeTarget CreateProgressRouter(IProgress<double> progress)
135135 + TimeSpan . FromSeconds ( seconds ) ;
136136
137137 progress . Report (
138- Math . Clamp (
139- processedDuration . TotalMilliseconds / totalDuration . Value . TotalMilliseconds ,
140- 0 ,
141- 1
142- )
138+ (
139+ processedDuration . TotalMilliseconds / totalDuration . Value . TotalMilliseconds
140+ ) . Clamp ( 0 , 1 )
143141 ) ;
144142 }
145143 } ) ;
Original file line number Diff line number Diff line change @@ -92,7 +92,8 @@ along with ([\d,\.]+) other people"
9292 . GetElementsByTagName ( "script" )
9393 . Select ( e => e . Text ( ) )
9494 . Select ( s => Regex . Match ( s , @"ytplayer\.config\s*=\s*(\{.*\})" ) . Groups [ 1 ] . Value )
95- . FirstOrDefault ( s => ! string . IsNullOrWhiteSpace ( s ) )
95+ . WhereNotNullOrWhiteSpace ( )
96+ . FirstOrDefault ( )
9697 ? . Pipe ( Json . Extract )
9798 . Pipe ( Json . TryParse ) ;
9899
@@ -104,7 +105,8 @@ along with ([\d,\.]+) other people"
104105 . Select ( s =>
105106 Regex . Match ( s , @"var\s+ytInitialPlayerResponse\s*=\s*(\{.*\})" ) . Groups [ 1 ] . Value
106107 )
107- . FirstOrDefault ( s => ! string . IsNullOrWhiteSpace ( s ) )
108+ . WhereNotNullOrWhiteSpace ( )
109+ . FirstOrDefault ( )
108110 ? . Pipe ( Json . Extract )
109111 . Pipe ( Json . TryParse )
110112 ? . Pipe ( j => new PlayerResponse ( j ) )
You can’t perform that action at this time.
0 commit comments