Browse Source

Do not abort when the API count differs from the actual count.

This check was more useful when we were doing next-page searches; now that we do date-based searches all it does is allow the broken channel API to lie to us
Zachary Kotlarek 9 years ago
parent
commit
87a4f3c683
1 changed files with 3 additions and 3 deletions
  1. 3 3
      yt/subscribe.pl

+ 3 - 3
yt/subscribe.pl

@@ -1238,13 +1238,13 @@ sub findVideos($) {
 		my $count = scalar(keys(%videos));
 		if ($DEBUG) {
 			print STDERR 'Found ' . $count . " remote videos\n";
+			if (abs(1 - ($count / $totalCount)) > $API_ST_REL && abs($totalCount - $count) > $API_ST_ABS) {
+				print STDERR 'Found only ' . $count . ' of ' . $totalCount . ' (' . int(100 * $count / $totalCount) . "%) channel-API-reported remote videos.\n";
+			}
 			if ($DEBUG > 1) {
 				print STDERR prettyPrint(\%videos, "\t") . "\n";
 			}
 		}
-		if (abs(1 - ($count / $totalCount)) > $API_ST_REL && abs($totalCount - $count) > $API_ST_ABS) {
-			die($NAME . ': Found only ' . $count . ' of ' . $totalCount . ' (' . int(100 * $count / $totalCount) . "%) remote videos. Aborting...\n");
-		}
 	}
 
 	return \%videos;