mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-22 16:23:50 +02:00
Sweep VRChat cache function
This commit is contained in:
@@ -7064,6 +7064,7 @@ speechSynthesis.getVoices();
|
||||
$app.data.worldAutoCacheGPS = configRepository.getString('VRCX_worldAutoCacheGPS');
|
||||
$app.data.worldAutoCacheInviteFilter = configRepository.getBool('VRCX_worldAutoCacheInviteFilter');
|
||||
$app.data.worldAutoCacheGPSFilter = configRepository.getBool('VRCX_worldAutoCacheGPSFilter');
|
||||
$app.data.autoSweepVRChatCache = configRepository.getBool('VRCX_autoSweepVRChatCache');
|
||||
var saveOpenVROption = function () {
|
||||
configRepository.setBool('openVR', this.openVR);
|
||||
configRepository.setBool('openVRAlways', this.openVRAlways);
|
||||
@@ -7081,6 +7082,7 @@ speechSynthesis.getVoices();
|
||||
configRepository.setString('VRCX_worldAutoCacheGPS', this.worldAutoCacheGPS);
|
||||
configRepository.setBool('VRCX_worldAutoCacheInviteFilter', this.worldAutoCacheInviteFilter);
|
||||
configRepository.setBool('VRCX_worldAutoCacheGPSFilter', this.worldAutoCacheGPSFilter);
|
||||
configRepository.setBool('VRCX_autoSweepVRChatCache', this.autoSweepVRChatCache);
|
||||
this.updateVRConfigVars();
|
||||
};
|
||||
$app.data.TTSvoices = speechSynthesis.getVoices();
|
||||
@@ -7108,6 +7110,7 @@ speechSynthesis.getVoices();
|
||||
$app.watch.worldAutoCacheGPS = saveOpenVROption;
|
||||
$app.watch.worldAutoCacheInviteFilter = saveOpenVROption;
|
||||
$app.watch.worldAutoCacheGPSFilter = saveOpenVROption;
|
||||
$app.watch.autoSweepVRChatCache = saveOpenVROption;
|
||||
$app.watch.notificationTTS = saveNotificationTTS;
|
||||
$app.data.isDarkMode = configRepository.getBool('isDarkMode');
|
||||
$appDarkStyle.disabled = $app.data.isDarkMode === false;
|
||||
@@ -11700,6 +11703,18 @@ speechSynthesis.getVoices();
|
||||
this.getVRChatCacheSize();
|
||||
};
|
||||
|
||||
$app.methods.sweepVRChatCache = async function () {
|
||||
await this.readVRChatConfigFile();
|
||||
var cacheDirectory = '';
|
||||
if (this.VRChatConfigFile.cache_directory) {
|
||||
cacheDirectory = this.VRChatConfigFile.cache_directory;
|
||||
}
|
||||
await AssetBundleCacher.SweepCache(cacheDirectory);
|
||||
if (this.VRChatConfigDialog.visible) {
|
||||
this.getVRChatCacheSize();
|
||||
}
|
||||
};
|
||||
|
||||
$app.data.VRChatUsedCacheSize = '';
|
||||
$app.data.VRChatTotalCacheSize = '';
|
||||
$app.data.VRChatCacheSizeLoading = false;
|
||||
|
||||
Reference in New Issue
Block a user