diff --git a/src/CasaBot/AutoScan/Implementations/ShinobiConnector.cs b/src/CasaBot/AutoScan/Implementations/ShinobiConnector.cs index f968bdb..e519a80 100644 --- a/src/CasaBot/AutoScan/Implementations/ShinobiConnector.cs +++ b/src/CasaBot/AutoScan/Implementations/ShinobiConnector.cs @@ -63,6 +63,11 @@ public class ShinobiConnector : IDVRConnector _logger.LogDebug("Downloading video..."); var videoData = await _httpClient.GetByteArrayAsync(endpoint); + if(_options.RunDry) + { + _logger.LogInformation("RunDry is enabled, skipping video download"); + return; + } //Write the video to the file await File.WriteAllBytesAsync(videoPath, videoData); _logger.LogInformation("Video downloaded successfully!"); diff --git a/src/CasaBot/AutoScan/Options/ShinobiOptions.cs b/src/CasaBot/AutoScan/Options/ShinobiOptions.cs index a5b710d..da72cfd 100644 --- a/src/CasaBot/AutoScan/Options/ShinobiOptions.cs +++ b/src/CasaBot/AutoScan/Options/ShinobiOptions.cs @@ -6,4 +6,5 @@ public class ShinobiOptions public string? APIKey { get; set; } public string? GroupId { get; set; } public string? MonitorId { get; set; } + public bool RunDry { get; set; } = false; } \ No newline at end of file diff --git a/src/CasaBot/CasaBotApp/appsettings.json b/src/CasaBot/CasaBotApp/appsettings.json index f8d2336..27a8631 100644 --- a/src/CasaBot/CasaBotApp/appsettings.json +++ b/src/CasaBot/CasaBotApp/appsettings.json @@ -16,7 +16,8 @@ "URL": "http://localhost:8080", "APIKey": "APIKEY", "GroupId": "Group", - "MonitorId": "Monitor" + "MonitorId": "Monitor", + "RunDry": false }, "AutoScan": { "Enabled": false,