mirror of
https://github.com/Radarr/Radarr
synced 2024-12-26 09:49:00 +00:00
Redownloading failed downloads works again. Fixes #89.
This commit is contained in:
parent
04e8c635e0
commit
f61c4feb00
3 changed files with 11 additions and 0 deletions
|
@ -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; }
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue