From 53e860be10eb282f4c4b2aac4312267156a14c1c Mon Sep 17 00:00:00 2001 From: Kavin <20838718+FireMasterK@users.noreply.github.com> Date: Sun, 2 Jul 2023 00:41:09 +0100 Subject: [PATCH] Add check to see if instances can fetch videos. --- main.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/main.go b/main.go index e95fc49..2bc6b7b 100644 --- a/main.go +++ b/main.go @@ -183,6 +183,16 @@ func monitorInstances() { } } + // check if instance can fetch videos + resp, err = http.Get(ApiUrl + "/streams/jNQXAC9IVRw") + if err != nil { + log.Print(err) + continue + } + if resp.StatusCode != 200 { + continue + } + instances = append(instances, Instance{ Name: strings.TrimSpace(split[0]), ApiUrl: ApiUrl,