From a6ccd6666ea1857f56a53ba834554335194bb70c Mon Sep 17 00:00:00 2001 From: redphx <96280+redphx@users.noreply.github.com> Date: Thu, 12 Sep 2024 22:03:21 +0700 Subject: [PATCH] Check next Remote Play server when the console list is empty --- src/modules/remote-play.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modules/remote-play.ts b/src/modules/remote-play.ts index 06d2db1..eb108a5 100644 --- a/src/modules/remote-play.ts +++ b/src/modules/remote-play.ts @@ -267,6 +267,10 @@ export class RemotePlay { const resp = await fetch(request); const json = await resp.json(); + if (json.results.length === 0) { + continue; + } + RemotePlay.#CONSOLES = json.results; // Store working server @@ -275,7 +279,7 @@ export class RemotePlay { callback(); } catch (e) {} - if (RemotePlay.#CONSOLES) { + if (RemotePlay.#CONSOLES && RemotePlay.#CONSOLES.length > 0) { break; } }