diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bf866b0..469b77e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 custom formats in the guide have the same name (e.g. 'DoVi'). - Debug-level logs are now written to file in addition to the Info-level logs in console output. +### Fixed + +- An issue with radarr `--preview` that caused duplicate output when updating a second instance has + been fixed. + ## [1.4.2] - 2021-05-15 ### Fixed diff --git a/src/Trash/Radarr/CustomFormat/CustomFormatUpdater.cs b/src/Trash/Radarr/CustomFormat/CustomFormatUpdater.cs index bb88367f..afacf05f 100644 --- a/src/Trash/Radarr/CustomFormat/CustomFormatUpdater.cs +++ b/src/Trash/Radarr/CustomFormat/CustomFormatUpdater.cs @@ -43,18 +43,19 @@ namespace Trash.Radarr.CustomFormat if (args.Preview) { PreviewCustomFormats(); - return; } + else + { + await _persistenceProcessor.PersistCustomFormats(_guideProcessor.ProcessedCustomFormats, + _guideProcessor.DeletedCustomFormatsInCache, _guideProcessor.ProfileScores); - await _persistenceProcessor.PersistCustomFormats(_guideProcessor.ProcessedCustomFormats, - _guideProcessor.DeletedCustomFormatsInCache, _guideProcessor.ProfileScores); - - PrintApiStatistics(args, _persistenceProcessor.Transactions); - PrintQualityProfileUpdates(); + PrintApiStatistics(args, _persistenceProcessor.Transactions); + PrintQualityProfileUpdates(); - // Cache all the custom formats (using ID from API response). - _cache.Update(_guideProcessor.ProcessedCustomFormats); - _cache.Save(); + // Cache all the custom formats (using ID from API response). + _cache.Update(_guideProcessor.ProcessedCustomFormats); + _cache.Save(); + } _persistenceProcessor.Reset(); _guideProcessor.Reset();