mirror of
https://github.com/lidarr/Lidarr
synced 2025-02-27 00:02:25 +00:00
Fixed: Lidarr stuck if Deluge didn't return an infohash.
This commit is contained in:
parent
641f8a88fa
commit
4725f4b2bd
3 changed files with 9 additions and 7 deletions
|
@ -57,6 +57,11 @@ protected override string AddFromTorrentFile(RemoteAlbum remoteAlbum, string has
|
|||
{
|
||||
var actualHash = _proxy.AddTorrentFromFile(filename, fileContent, Settings);
|
||||
|
||||
if (actualHash.IsNullOrWhiteSpace())
|
||||
{
|
||||
throw new DownloadClientException("Deluge failed to add torrent " + filename);
|
||||
}
|
||||
|
||||
if (!Settings.TvCategory.IsNullOrWhiteSpace())
|
||||
{
|
||||
_proxy.SetLabel(actualHash, Settings.TvCategory, Settings);
|
||||
|
|
|
@ -86,8 +86,7 @@ public void Add(DownloadDecision decision, PendingReleaseReason reason)
|
|||
{
|
||||
if (matchingReport.Reason != reason)
|
||||
{
|
||||
_logger.Debug("This release is already pending with reason {0}, changing to {1}", matchingReport.Reason, reason);
|
||||
matchingReport.Reason = reason;
|
||||
_logger.Debug("The release {0} is already pending with reason {1}, changing to {2}", decision.RemoteAlbum, matchingReport.Reason, reason); matchingReport.Reason = reason;
|
||||
_repository.Update(matchingReport);
|
||||
sameReason = false;
|
||||
}
|
||||
|
@ -95,13 +94,11 @@ public void Add(DownloadDecision decision, PendingReleaseReason reason)
|
|||
|
||||
if (sameReason)
|
||||
{
|
||||
_logger.Debug("This release is already pending with reason {0}, not adding again", reason);
|
||||
return;
|
||||
_logger.Debug("The release {0} is already pending with reason {1}, not adding again", decision.RemoteAlbum, reason); return;
|
||||
}
|
||||
}
|
||||
|
||||
_logger.Debug("Adding release to pending releases with reason {0}", reason);
|
||||
Insert(decision, reason);
|
||||
_logger.Debug("Adding release {0} to pending releases with reason {1}", decision.RemoteAlbum, reason); Insert(decision, reason);
|
||||
}
|
||||
|
||||
public List<ReleaseInfo> GetPending()
|
||||
|
|
|
@ -78,7 +78,7 @@ public ProcessedDecisions ProcessDecisions(List<DownloadDecision> decisions)
|
|||
{
|
||||
if (ex is DownloadClientUnavailableException || ex is DownloadClientAuthenticationException)
|
||||
{
|
||||
_logger.Debug("Failed to send release to download client, storing until later");
|
||||
_logger.Debug(ex, "Failed to send release to download client, storing until later. " + remoteAlbum);
|
||||
failed.Add(report);
|
||||
|
||||
if (downloadProtocol == DownloadProtocol.Usenet)
|
||||
|
|
Loading…
Reference in a new issue