Run the torrent complete before deleting the torrent.

This commit is contained in:
Roger Far 2024-01-05 11:38:39 -07:00
parent 95574847e9
commit 12eefa028b

View file

@ -530,6 +530,15 @@ public class TorrentRunner
await _torrents.UpdateComplete(torrent.TorrentId, null, DateTimeOffset.UtcNow, true);
try
{
await _torrents.RunTorrentComplete(torrent.TorrentId);
}
catch (Exception ex)
{
_logger.LogError(ex.Message, "Unable to run post process: {Message}", ex.Message);
}
if (torrent.DownloadClient == Data.Enums.DownloadClient.Symlink)
{
torrent.FinishedAction = torrent.FinishedAction switch
@ -566,15 +575,6 @@ public class TorrentRunner
break;
}
try
{
await _torrents.RunTorrentComplete(torrent.TorrentId);
}
catch (Exception ex)
{
_logger.LogError(ex.Message, "Unable to run post process: {Message}", ex.Message);
}
}
else
{