diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/slskd/Transfers/Downloads/DownloadService.cs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/slskd/Transfers/Downloads/DownloadService.cs b/src/slskd/Transfers/Downloads/DownloadService.cs index d1dfbd20..c85ff551 100644 --- a/src/slskd/Transfers/Downloads/DownloadService.cs +++ b/src/slskd/Transfers/Downloads/DownloadService.cs @@ -226,13 +226,18 @@ namespace slskd.Transfers.Downloads // this would be the ideal place to hook in a generic post-download task processor for now, we'll // just carry out hard coded behavior. these carry the risk of failing the transfer, and i could // argue both ways for that being the correct behavior. revisit this later. - MoveFile(file.Filename, OptionsMonitor.CurrentValue.Directories.Incomplete, OptionsMonitor.CurrentValue.Directories.Downloads); + var finalFilename = MoveFile(file.Filename, OptionsMonitor.CurrentValue.Directories.Incomplete, OptionsMonitor.CurrentValue.Directories.Downloads); - Relay.BroadcastFileDownloadCompletedNotification(file.Filename); + Log.Debug("Moved file to {Destination}", finalFilename); + + if (OptionsMonitor.CurrentValue.Relay.Enabled) + { + _ = Relay.BroadcastFileDownloadCompletedNotificationAsync(finalFilename); + } if (OptionsMonitor.CurrentValue.Integration.Ftp.Enabled) { - _ = FTP.UploadAsync(file.Filename.ToLocalFilename(OptionsMonitor.CurrentValue.Directories.Downloads)); + _ = FTP.UploadAsync(finalFilename); } } catch (OperationCanceledException ex) |
