mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-18 22:33:50 +02:00
feat: Add options to save the current world name/id to screenshot metadata/filenames
This commit is contained in:
@@ -168,7 +168,7 @@ namespace VRCX
|
||||
|
||||
m_FirstRun = false;
|
||||
}
|
||||
|
||||
|
||||
private void ParseLog(FileInfo fileInfo, LogContext logContext)
|
||||
{
|
||||
try
|
||||
@@ -227,7 +227,8 @@ namespace VRCX
|
||||
ParseLogUsharpVideoPlay(fileInfo, logContext, line, offset) == true ||
|
||||
ParseLogUsharpVideoSync(fileInfo, logContext, line, offset) == true ||
|
||||
ParseLogWorldVRCX(fileInfo, logContext, line, offset) == true ||
|
||||
ParseLogOnAudioConfigurationChanged(fileInfo, logContext, line, offset) == true)
|
||||
ParseLogOnAudioConfigurationChanged(fileInfo, logContext, line, offset) == true ||
|
||||
ParseLogScreenshot(fileInfo, logContext, line, offset) == true)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -344,6 +345,22 @@ namespace VRCX
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool ParseLogScreenshot(FileInfo fileInfo, LogContext logContext, string line, int offset)
|
||||
{
|
||||
// This won't work with VRChat's new "Multi Layer" camera mode, since it doesn't output any logs like normal pictures.
|
||||
// 2023.02.08 12:31:35 Log - [VRC Camera] Took screenshot to: C:\Users\Tea\Pictures\VRChat\2023-02\VRChat_2023-02-08_12-31-35.104_1920x1080.png
|
||||
if (!line.Contains("[VRC Camera] Took screenshot to: "))
|
||||
return false;
|
||||
|
||||
var lineOffset = line.LastIndexOf("] Took screenshot to: ");
|
||||
if (lineOffset < 0)
|
||||
return true;
|
||||
|
||||
var screenshotPath = line.Substring(lineOffset + 22);
|
||||
AppendLog(new[] { fileInfo.Name, ConvertLogTimeToISO8601(line), "screenshot", screenshotPath });
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool ParseLogLocationDestination(FileInfo fileInfo, LogContext logContext, string line, int offset)
|
||||
{
|
||||
// 2021.09.02 00:02:12 Log - [Behaviour] Destination set: wrld_4432ea9b-729c-46e3-8eaf-846aa0a37fdd:15609~private(usr_032383a7-748c-4fb2-94e4-bcb928e5de6b)~nonce(72CC87D420C1D49AEFFBEE8824C84B2DF0E38678E840661E)
|
||||
|
||||
Reference in New Issue
Block a user