Skip to content

Commit b4b39da

Browse files
authored
Merge pull request #340 from benaclejames/feat/module-islocal
feat(module): Create IsLocal to prevent module updates for manually installed modules.
2 parents 34c4820 + 4c9ccc4 commit b4b39da

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

VRCFaceTracking.Core/Models/TrackingModuleMetadata.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ public string Version
1919
get;
2020
set;
2121
} = "Unknown";
22+
23+
public bool IsLocal
24+
{
25+
get; set;
26+
}
2227

2328
public int Downloads
2429
{

VRCFaceTracking.Core/Services/ModuleInstaller.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ public async Task<string> InstallLocalModule(string zipPath)
165165
Directory.Delete(tempDirectory, true);
166166
return null;
167167
}
168+
moduleMetadata.IsLocal = true;
168169

169170
// Now we move to a directory named after the module id and delete the temp directory
170171
var moduleDirectory = Path.Combine(Utils.CustomLibsDirectory, moduleMetadata.ModuleId.ToString());

VRCFaceTracking/Services/ActivationService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ private async Task StartupAsync()
127127
var remoteModules = await _moduleDataService.GetRemoteModules();
128128
var outdatedModules = remoteModules.Where(rm => localModules.Any(lm =>
129129
{
130-
if (rm.ModuleId != lm.ModuleId)
130+
if (rm.ModuleId != lm.ModuleId || lm.IsLocal)
131131
return false;
132-
132+
133133
try
134134
{
135135
var remoteVersion = new Version(rm.Version);

0 commit comments

Comments
 (0)