Check next Remote Play server when the console list is empty

This commit is contained in:
redphx 2024-09-12 22:03:21 +07:00
parent fe609034d6
commit a6ccd6666e

View File

@ -267,6 +267,10 @@ export class RemotePlay {
const resp = await fetch(request); const resp = await fetch(request);
const json = await resp.json(); const json = await resp.json();
if (json.results.length === 0) {
continue;
}
RemotePlay.#CONSOLES = json.results; RemotePlay.#CONSOLES = json.results;
// Store working server // Store working server
@ -275,7 +279,7 @@ export class RemotePlay {
callback(); callback();
} catch (e) {} } catch (e) {}
if (RemotePlay.#CONSOLES) { if (RemotePlay.#CONSOLES && RemotePlay.#CONSOLES.length > 0) {
break; break;
} }
} }