diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/slskd/Transfers/Downloads/DownloadService.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/slskd/Transfers/Downloads/DownloadService.cs b/src/slskd/Transfers/Downloads/DownloadService.cs index efa5d644..9beb8077 100644 --- a/src/slskd/Transfers/Downloads/DownloadService.cs +++ b/src/slskd/Transfers/Downloads/DownloadService.cs @@ -385,16 +385,16 @@ namespace slskd.Transfers.Downloads Log.Debug("Moved file {Filename} to {Destination}", transfer.Filename, finalFilename); - try + if (OptionsMonitor.CurrentValue.Relay.Enabled) { - Log.Debug("Running post-download logic for {Filename} from {Username}", transfer.Filename, transfer.Username); + _ = Relay.NotifyFileDownloadCompleteAsync(finalFilename); + } + try + { // begin post-processing tasks; the file is downloaded, it has been removed from the client's download dictionary, // and the file has been moved from the incomplete directory to the downloads directory - if (OptionsMonitor.CurrentValue.Relay.Enabled) - { - _ = Relay.NotifyFileDownloadCompleteAsync(finalFilename); - } + Log.Debug("Running post-download logic for {Filename} from {Username}", transfer.Filename, transfer.Username); EventBus.Raise(new DownloadFileCompleteEvent { |
