Skip to content

Commit

Permalink
[VRChatLogParser] Issue when VRChat logs were not on startup.
Browse files Browse the repository at this point in the history
  • Loading branch information
Soapwood committed Aug 1, 2024
1 parent 05ed07e commit 528f300
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
15 changes: 12 additions & 3 deletions VXMusic/LogParser/VRChat/VRChatLogParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public class VRChatLogParser : INotifyPropertyChanged

static volatile bool IsExiting = false;

private static bool VrChatRuntimeLogDirExists => Directory.Exists(Configuration.OutputLogRoot);

static Task DispatchTask;

static int DispatchResolutionMilliseconds = 50;
Expand Down Expand Up @@ -84,7 +86,16 @@ public VRChatLogParser(IServiceProvider serviceProvider)

_logger.LogTrace("Creating VRChatLogParser.");

Run();
Configuration = ConfigurationModel.Load();

if (VrChatRuntimeLogDirExists)
{
Run();
}
else
{
_logger.LogWarning("VRChat Log directory not found. Will not Run VRChatLogParser.");
}
}

public enum LogEventType
Expand Down Expand Up @@ -133,8 +144,6 @@ public void Run()

try
{
Configuration = ConfigurationModel.Load();

// Rewrite configuration to update it with any new fields not in existing configuration. Useful during update process and making sure the config always has updated annotations.
// Users shouldn't need to re-configure every time they update the software.
ConfigurationModel.Save(VRChatLogParser.Configuration);
Expand Down
2 changes: 1 addition & 1 deletion VXMusicDesktop/VXMusicDesktop.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<PackageIcon>VXLogo.png</PackageIcon>
<ApplicationIcon>Images\VXLogoIcon.ico</ApplicationIcon>
<RunPostBuildEvent>Always</RunPostBuildEvent>
<Version>0.6.5.0</Version>
<Version>0.6.5.1</Version>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
<Title>VXMusicDesktop</Title>
<Authors>VirtualXtensions</Authors>
Expand Down

0 comments on commit 528f300

Please sign in to comment.