mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-28 19:23:47 +02:00
Fix favourites search from crashing
Add session GUID for avatar search and updater requests
This commit is contained in:
15
src/app.js
15
src/app.js
@@ -295,6 +295,7 @@ console.log(`isLinux: ${LINUX}`);
|
||||
console.error(err);
|
||||
}
|
||||
await AppApi.SetUserAgent();
|
||||
await this.loadVrcxId();
|
||||
this.appVersion = await AppApi.GetVersion();
|
||||
await this.compareAppVersion();
|
||||
await this.setBranch();
|
||||
@@ -2669,6 +2670,14 @@ console.log(`isLinux: ${LINUX}`);
|
||||
await configRepository.setString('VRCX_branch', this.branch);
|
||||
};
|
||||
|
||||
$app.data.vrcxId = '';
|
||||
$app.methods.loadVrcxId = async function () {
|
||||
vrcxId = await configRepository.getString(
|
||||
'VRCX_id',
|
||||
crypto.randomUUID()
|
||||
);
|
||||
};
|
||||
|
||||
$app.methods.updateIsGameRunning = async function (
|
||||
isGameRunning,
|
||||
isSteamVRRunning,
|
||||
@@ -9459,7 +9468,8 @@ console.log(`isLinux: ${LINUX}`);
|
||||
}?${type}=${encodeURIComponent(search)}&n=5000`,
|
||||
method: 'GET',
|
||||
headers: {
|
||||
Referer: 'https://vrcx.app'
|
||||
Referer: 'https://vrcx.app',
|
||||
'VRCX-ID': this.vrcxId
|
||||
}
|
||||
});
|
||||
var json = JSON.parse(response.data);
|
||||
@@ -9535,7 +9545,8 @@ console.log(`isLinux: ${LINUX}`);
|
||||
url: `${url}?authorId=${encodeURIComponent(authorId)}`,
|
||||
method: 'GET',
|
||||
headers: {
|
||||
Referer: 'https://vrcx.app'
|
||||
Referer: 'https://vrcx.app',
|
||||
'VRCX-ID': this.vrcxId
|
||||
}
|
||||
});
|
||||
var json = JSON.parse(response.data);
|
||||
|
||||
Reference in New Issue
Block a user