mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-20 15:23:50 +02:00
feat: Add options to save the current world name/id to screenshot metadata/filenames
This commit is contained in:
@@ -9272,6 +9272,22 @@ speechSynthesis.getVoices();
|
||||
this.nowPlaying.offset = parseInt(timestamp, 10);
|
||||
}
|
||||
return;
|
||||
case 'screenshot':
|
||||
if (!this.isGameRunning || !this.screenshotHelper) return;
|
||||
|
||||
var entry = {
|
||||
created_at: gameLog.dt,
|
||||
type: 'Event',
|
||||
//location: location,
|
||||
data: "Screenshot Processed: " + gameLog.screenshotPath.replace(/^.*[\\\/]/, ''),
|
||||
};
|
||||
|
||||
let world = API.parseLocation(this.lastLocation.location);
|
||||
let worldID = world.worldId;
|
||||
|
||||
database.addGamelogEventToDatabase(entry);
|
||||
AppApi.AddScreenshotMetadata(gameLog.screenshotPath, this.lastLocation.name, worldID, this.screenshotHelperModifyFilename);
|
||||
break;
|
||||
case 'api-request':
|
||||
var bias = Date.parse(gameLog.dt) + 60 * 1000;
|
||||
if (
|
||||
@@ -13477,6 +13493,9 @@ speechSynthesis.getVoices();
|
||||
'VRCX_progressPieFilter'
|
||||
);
|
||||
|
||||
$app.data.screenshotHelper = configRepository.getBool('VRCX_screenshotHelper');
|
||||
$app.data.screenshotHelperModifyFilename = configRepository.getBool('VRCX_screenshotHelperModifyFilename');
|
||||
|
||||
$app.methods.updateVRConfigVars = function () {
|
||||
var notificationTheme = 'relax';
|
||||
if (this.isDarkMode) {
|
||||
@@ -20060,6 +20079,18 @@ speechSynthesis.getVoices();
|
||||
this.VRChatConfigFile.screenshot_res_width = res.width;
|
||||
};
|
||||
|
||||
// Screenshot Helper
|
||||
|
||||
$app.methods.saveScreenshotHelper = function () {
|
||||
console.log("save helper toggle press")
|
||||
configRepository.setBool('VRCX_screenshotHelper', this.screenshotHelper);
|
||||
};
|
||||
|
||||
$app.methods.saveScreenshotHelperModifyFilename = function () {
|
||||
console.log("save helper filename toggle press")
|
||||
configRepository.setBool('VRCX_screenshotHelperSaveFilename', this.screenshotHelperModifyFilename);
|
||||
};
|
||||
|
||||
// YouTube API
|
||||
|
||||
$app.data.youTubeApiKey = '';
|
||||
|
||||
Reference in New Issue
Block a user