File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,8 @@ public HashSet<string> SCV5Directories
62
62
}
63
63
HashSet < string > scv5Directories ;
64
64
65
+ public bool AutoObjectDiscoveryAndUpload { get ; set ; }
66
+
65
67
public bool UseHttps { get ; set ; }
66
68
public string ServerAddressHttp { get ; set ; } = "http://openloco.leftofzen.dev/" ;
67
69
public string ServerAddressHttps { get ; set ; } = "https://openloco.leftofzen.dev/" ;
Original file line number Diff line number Diff line change @@ -456,10 +456,14 @@ public async Task CheckForDatFilesNotOnServer()
456
456
Logger . Info ( $ "Found { localButNotOnline . Count } objects that aren't known to the object repository!") ;
457
457
458
458
// would you like to upload?
459
-
460
- foreach ( var dat in localButNotOnline )
459
+ var isEnabledString = Settings . AutoObjectDiscoveryAndUpload ? "enabled" : "disabled" ;
460
+ Logger . Info ( $ "Automatic object discovery and upload to master service is { isEnabledString } ") ;
461
+ if ( Settings . AutoObjectDiscoveryAndUpload )
461
462
{
462
- await UploadDatToServer ( dat ) ;
463
+ foreach ( var dat in localButNotOnline )
464
+ {
465
+ await UploadDatToServer ( dat ) ;
466
+ }
463
467
}
464
468
}
465
469
else
You can’t perform that action at this time.
0 commit comments