mirror of
https://github.com/LizardByte/Sunshine.git
synced 2024-11-16 23:10:13 +00:00
fix(ui-apps): update game db url (#3148)
Some checks failed
CI / GitHub Env Debug (push) Has been cancelled
CI / Setup Release (push) Has been cancelled
CI / Setup Flatpak Matrix (push) Has been cancelled
CI Docker / Check Dockerfiles (push) Has been cancelled
CodeQL / Get language matrix (push) Has been cancelled
localize / Update Localization (push) Has been cancelled
Build GH-Pages / update_pages (push) Has been cancelled
CI / Linux Flatpak (push) Has been cancelled
CI / Linux ${{ matrix.type }} (--appimage-build, 22.04, AppImage) (push) Has been cancelled
CI / Homebrew (${{ matrix.os_name }}-${{ matrix.os_version }}${{ matrix.release == true && ' (Release)' || '' }}) (macos, 12) (push) Has been cancelled
CI / Homebrew (${{ matrix.os_name }}-${{ matrix.os_version }}${{ matrix.release == true && ' (Release)' || '' }}) (macos, 13) (push) Has been cancelled
CI / Homebrew (${{ matrix.os_name }}-${{ matrix.os_version }}${{ matrix.release == true && ' (Release)' || '' }}) (macos, 14) (push) Has been cancelled
CI / Homebrew (${{ matrix.os_name }}-${{ matrix.os_version }}${{ matrix.release == true && ' (Release)' || '' }}) (ubuntu, latest) (push) Has been cancelled
CI / Homebrew (${{ matrix.os_name }}-${{ matrix.os_version }}${{ matrix.release == true && ' (Release)' || '' }}) (ubuntu, latest, true) (push) Has been cancelled
CI / Macports (macOS-${{ matrix.os_version }}) (12, true) (push) Has been cancelled
CI / Macports (macOS-${{ matrix.os_version }}) (13) (push) Has been cancelled
CI / Macports (macOS-${{ matrix.os_version }}) (14) (push) Has been cancelled
CI / Windows (push) Has been cancelled
CI Docker / Setup Release (push) Has been cancelled
CI Docker / Docker${{ matrix.tag }} (push) Has been cancelled
CodeQL / Analyze (${{ matrix.name }}) (push) Has been cancelled
Some checks failed
CI / GitHub Env Debug (push) Has been cancelled
CI / Setup Release (push) Has been cancelled
CI / Setup Flatpak Matrix (push) Has been cancelled
CI Docker / Check Dockerfiles (push) Has been cancelled
CodeQL / Get language matrix (push) Has been cancelled
localize / Update Localization (push) Has been cancelled
Build GH-Pages / update_pages (push) Has been cancelled
CI / Linux Flatpak (push) Has been cancelled
CI / Linux ${{ matrix.type }} (--appimage-build, 22.04, AppImage) (push) Has been cancelled
CI / Homebrew (${{ matrix.os_name }}-${{ matrix.os_version }}${{ matrix.release == true && ' (Release)' || '' }}) (macos, 12) (push) Has been cancelled
CI / Homebrew (${{ matrix.os_name }}-${{ matrix.os_version }}${{ matrix.release == true && ' (Release)' || '' }}) (macos, 13) (push) Has been cancelled
CI / Homebrew (${{ matrix.os_name }}-${{ matrix.os_version }}${{ matrix.release == true && ' (Release)' || '' }}) (macos, 14) (push) Has been cancelled
CI / Homebrew (${{ matrix.os_name }}-${{ matrix.os_version }}${{ matrix.release == true && ' (Release)' || '' }}) (ubuntu, latest) (push) Has been cancelled
CI / Homebrew (${{ matrix.os_name }}-${{ matrix.os_version }}${{ matrix.release == true && ' (Release)' || '' }}) (ubuntu, latest, true) (push) Has been cancelled
CI / Macports (macOS-${{ matrix.os_version }}) (12, true) (push) Has been cancelled
CI / Macports (macOS-${{ matrix.os_version }}) (13) (push) Has been cancelled
CI / Macports (macOS-${{ matrix.os_version }}) (14) (push) Has been cancelled
CI / Windows (push) Has been cancelled
CI Docker / Setup Release (push) Has been cancelled
CI Docker / Docker${{ matrix.tag }} (push) Has been cancelled
CodeQL / Analyze (${{ matrix.name }}) (push) Has been cancelled
This commit is contained in:
parent
87f0c27aeb
commit
cdc2d1ba00
@ -481,14 +481,17 @@
|
||||
return Promise.resolve([]);
|
||||
}
|
||||
let searchName = name.replaceAll(/\s+/g, '.').toLowerCase();
|
||||
|
||||
// Use raw.githubusercontent.com to avoid CORS issues as we migrate the CNAME
|
||||
let dbUrl = "https://raw.githubusercontent.com/LizardByte/GameDB/gh-pages";
|
||||
let bucket = getSearchBucket(name);
|
||||
return fetch("https://db.lizardbyte.dev/buckets/" + bucket + ".json").then(function (r) {
|
||||
return fetch(`${dbUrl}/buckets/${bucket}.json`).then(function (r) {
|
||||
if (!r.ok) throw new Error("Failed to search covers");
|
||||
return r.json();
|
||||
}).then(maps => Promise.all(Object.keys(maps).map(id => {
|
||||
let item = maps[id];
|
||||
if (item.name.replaceAll(/\s+/g, '.').toLowerCase().startsWith(searchName)) {
|
||||
return fetch("https://db.lizardbyte.dev/games/" + id + ".json").then(function (r) {
|
||||
return fetch(`${dbUrl}/games/${id}.json`).then(function (r) {
|
||||
return r.json();
|
||||
}).catch(() => null);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user