feat: enable run dry options to skip download
This commit is contained in:
parent
461c545cb0
commit
dc34c85834
@ -63,6 +63,11 @@ public class ShinobiConnector : IDVRConnector
|
|||||||
_logger.LogDebug("Downloading video...");
|
_logger.LogDebug("Downloading video...");
|
||||||
var videoData = await _httpClient.GetByteArrayAsync(endpoint);
|
var videoData = await _httpClient.GetByteArrayAsync(endpoint);
|
||||||
|
|
||||||
|
if(_options.RunDry)
|
||||||
|
{
|
||||||
|
_logger.LogInformation("RunDry is enabled, skipping video download");
|
||||||
|
return;
|
||||||
|
}
|
||||||
//Write the video to the file
|
//Write the video to the file
|
||||||
await File.WriteAllBytesAsync(videoPath, videoData);
|
await File.WriteAllBytesAsync(videoPath, videoData);
|
||||||
_logger.LogInformation("Video downloaded successfully!");
|
_logger.LogInformation("Video downloaded successfully!");
|
||||||
|
@ -6,4 +6,5 @@ public class ShinobiOptions
|
|||||||
public string? APIKey { get; set; }
|
public string? APIKey { get; set; }
|
||||||
public string? GroupId { get; set; }
|
public string? GroupId { get; set; }
|
||||||
public string? MonitorId { get; set; }
|
public string? MonitorId { get; set; }
|
||||||
|
public bool RunDry { get; set; } = false;
|
||||||
}
|
}
|
@ -16,7 +16,8 @@
|
|||||||
"URL": "http://localhost:8080",
|
"URL": "http://localhost:8080",
|
||||||
"APIKey": "APIKEY",
|
"APIKey": "APIKEY",
|
||||||
"GroupId": "Group",
|
"GroupId": "Group",
|
||||||
"MonitorId": "Monitor"
|
"MonitorId": "Monitor",
|
||||||
|
"RunDry": false
|
||||||
},
|
},
|
||||||
"AutoScan": {
|
"AutoScan": {
|
||||||
"Enabled": false,
|
"Enabled": false,
|
||||||
|
Loading…
Reference in New Issue
Block a user