mirror of
https://github.com/TeamPiped/instances-api.git
synced 2024-12-06 19:16:17 +01:00
Add check to see if instances can fetch videos.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user