aboutsummaryrefslogtreecommitdiffstats
path: root/lib/WWW
diff options
context:
space:
mode:
authortrizen <trizen@protonmail.com>2020-09-06 11:18:24 +0300
committerJesús <heckyel@hyperbola.info>2020-09-14 10:54:53 -0500
commita2ce13749b09345ee6e18c8f09ff2242f0fa9078 (patch)
tree81c2c0723bf106ab850f0e35949f1cc890f8b4f0 /lib/WWW
parent185bc58f0d53dcf16255d5c206758c1aedf623ba (diff)
downloadfair-viewer-a2ce13749b09345ee6e18c8f09ff2242f0fa9078.tar.lz
fair-viewer-a2ce13749b09345ee6e18c8f09ff2242f0fa9078.tar.xz
fair-viewer-a2ce13749b09345ee6e18c8f09ff2242f0fa9078.zip
Documented `--api=auto`.
Signed-off-by: Jesús <heckyel@hyperbola.info>
Diffstat (limited to 'lib/WWW')
-rw-r--r--lib/WWW/FairViewer.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/WWW/FairViewer.pm b/lib/WWW/FairViewer.pm
index 2f7314a..59307d5 100644
--- a/lib/WWW/FairViewer.pm
+++ b/lib/WWW/FairViewer.pm
@@ -495,6 +495,7 @@ sub _append_url_args {
sub get_invidious_instances {
my ($self) = @_;
+ require File::Spec;
my $instances_file = File::Spec->catfile($self->get_config_dir, 'instances.json');
# Get the "instances.json" file when the local copy is too old or non-existent
@@ -508,7 +509,7 @@ sub get_invidious_instances {
$resp->is_success() or return;
- my $json = $resp->decoded_content() // return;
+ my $json = $resp->decoded_content() || return;
open(my $fh, '>', $instances_file) or return;
print $fh $json;
close $fh;