1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2024-12-26 01:38:24 +00:00

Redownloading failed downloads works again. Fixes #89.

This commit is contained in:
Leonardo Galli 2017-01-10 14:15:27 +01:00
parent 04e8c635e0
commit f61c4feb00
3 changed files with 11 additions and 0 deletions

View file

@ -13,6 +13,7 @@ public DownloadFailedEvent()
}
public int SeriesId { get; set; }
public int MovieId { get; set; }
public List<int> EpisodeIds { get; set; }
public QualityModel Quality { get; set; }
public string SourceTitle { get; set; }

View file

@ -88,6 +88,7 @@ private void PublishDownloadFailedEvent(List<History.History> historyItems, stri
var downloadFailedEvent = new DownloadFailedEvent
{
SeriesId = historyItem.SeriesId,
MovieId = historyItem.MovieId,
EpisodeIds = historyItems.Select(h => h.EpisodeId).ToList(),
Quality = historyItem.Quality,
SourceTitle = historyItem.SourceTitle,

View file

@ -34,6 +34,15 @@ public void HandleAsync(DownloadFailedEvent message)
return;
}
if (message.MovieId != 0)
{
_logger.Debug("Failed download contains a movie, searching again.");
_commandQueueManager.Push(new MoviesSearchCommand { MovieId = message.MovieId });
return;
}
if (message.EpisodeIds.Count == 1)
{
_logger.Debug("Failed download only contains one episode, searching again");