From 3855c43f51e7639fa2e29c6f4d01fd2fcf56ed02 Mon Sep 17 00:00:00 2001 From: trizen Date: Sun, 1 Nov 2020 01:27:16 +0200 Subject: Pick and set a random invidious instance when the current instance is down. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jesús --- bin/gtk-fair-viewer | 2 +- lib/WWW/FairViewer.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/gtk-fair-viewer b/bin/gtk-fair-viewer index dd06cfa..36f029d 100755 --- a/bin/gtk-fair-viewer +++ b/bin/gtk-fair-viewer @@ -2490,7 +2490,7 @@ sub display_results { my $current_instance = $yv_obj->get_api_host(); # Server error. Pick another invidious instance. - # $yv_obj->pick_and_set_random_instance(); + $yv_obj->pick_and_set_random_instance(); die "Probably $current_instance is down.\n" . "\nTry changing the `api_host` in configuration file:\n\n" diff --git a/lib/WWW/FairViewer.pm b/lib/WWW/FairViewer.pm index 3546fb4..e8c363e 100644 --- a/lib/WWW/FairViewer.pm +++ b/lib/WWW/FairViewer.pm @@ -445,7 +445,7 @@ sub lwp_get { } # Too many errors. Pick another invidious instance. - # $self->pick_and_set_random_instance(); + $self->pick_and_set_random_instance(); _warn_reponse_error($response, $url); return; -- cgit v1.2.3