mirror of
https://github.com/Radarr/Radarr
synced 2025-02-23 14:51:17 +00:00
New: Add Release group to history for all events
Fixes #6986 Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
This commit is contained in:
parent
4084ce5c2f
commit
75b2414e29
3 changed files with 8 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using NzbDrone.Common.Messaging;
|
using NzbDrone.Common.Messaging;
|
||||||
|
using NzbDrone.Core.Download.TrackedDownloads;
|
||||||
using NzbDrone.Core.Languages;
|
using NzbDrone.Core.Languages;
|
||||||
using NzbDrone.Core.Qualities;
|
using NzbDrone.Core.Qualities;
|
||||||
|
|
||||||
|
@ -13,6 +14,7 @@ public class DownloadIgnoredEvent : IEvent
|
||||||
public string SourceTitle { get; set; }
|
public string SourceTitle { get; set; }
|
||||||
public DownloadClientItemClientInfo DownloadClientInfo { get; set; }
|
public DownloadClientItemClientInfo DownloadClientInfo { get; set; }
|
||||||
public string DownloadId { get; set; }
|
public string DownloadId { get; set; }
|
||||||
|
public TrackedDownload TrackedDownload { get; set; }
|
||||||
public string Message { get; set; }
|
public string Message { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,6 +39,7 @@ public bool IgnoreDownload(TrackedDownload trackedDownload)
|
||||||
SourceTitle = trackedDownload.DownloadItem.Title,
|
SourceTitle = trackedDownload.DownloadItem.Title,
|
||||||
DownloadClientInfo = trackedDownload.DownloadItem.DownloadClientInfo,
|
DownloadClientInfo = trackedDownload.DownloadItem.DownloadClientInfo,
|
||||||
DownloadId = trackedDownload.DownloadItem.DownloadId,
|
DownloadId = trackedDownload.DownloadItem.DownloadId,
|
||||||
|
TrackedDownload = trackedDownload,
|
||||||
Message = "Manually ignored"
|
Message = "Manually ignored"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -201,6 +201,7 @@ public void Handle(MovieImportedEvent message)
|
||||||
history.Data.Add("ImportedPath", Path.Combine(movie.Path, message.ImportedMovie.RelativePath));
|
history.Data.Add("ImportedPath", Path.Combine(movie.Path, message.ImportedMovie.RelativePath));
|
||||||
history.Data.Add("DownloadClient", message.DownloadClientInfo?.Type);
|
history.Data.Add("DownloadClient", message.DownloadClientInfo?.Type);
|
||||||
history.Data.Add("DownloadClientName", message.DownloadClientInfo?.Name);
|
history.Data.Add("DownloadClientName", message.DownloadClientInfo?.Name);
|
||||||
|
history.Data.Add("ReleaseGroup", message.MovieInfo.ReleaseGroup);
|
||||||
|
|
||||||
_historyRepository.Insert(history);
|
_historyRepository.Insert(history);
|
||||||
}
|
}
|
||||||
|
@ -224,6 +225,7 @@ public void Handle(MovieFileDeletedEvent message)
|
||||||
};
|
};
|
||||||
|
|
||||||
history.Data.Add("Reason", message.Reason.ToString());
|
history.Data.Add("Reason", message.Reason.ToString());
|
||||||
|
history.Data.Add("ReleaseGroup", message.MovieFile.ReleaseGroup);
|
||||||
|
|
||||||
_historyRepository.Insert(history);
|
_historyRepository.Insert(history);
|
||||||
}
|
}
|
||||||
|
@ -249,6 +251,7 @@ public void Handle(MovieFileRenamedEvent message)
|
||||||
history.Data.Add("SourceRelativePath", sourceRelativePath);
|
history.Data.Add("SourceRelativePath", sourceRelativePath);
|
||||||
history.Data.Add("Path", path);
|
history.Data.Add("Path", path);
|
||||||
history.Data.Add("RelativePath", relativePath);
|
history.Data.Add("RelativePath", relativePath);
|
||||||
|
history.Data.Add("ReleaseGroup", message.MovieFile.ReleaseGroup);
|
||||||
|
|
||||||
_historyRepository.Insert(history);
|
_historyRepository.Insert(history);
|
||||||
}
|
}
|
||||||
|
@ -269,6 +272,7 @@ public void Handle(DownloadIgnoredEvent message)
|
||||||
history.Data.Add("DownloadClient", message.DownloadClientInfo.Type);
|
history.Data.Add("DownloadClient", message.DownloadClientInfo.Type);
|
||||||
history.Data.Add("DownloadClientName", message.DownloadClientInfo.Name);
|
history.Data.Add("DownloadClientName", message.DownloadClientInfo.Name);
|
||||||
history.Data.Add("Message", message.Message);
|
history.Data.Add("Message", message.Message);
|
||||||
|
history.Data.Add("ReleaseGroup", message.TrackedDownload?.RemoteMovie?.ParsedMovieInfo?.ReleaseGroup);
|
||||||
|
|
||||||
_historyRepository.Insert(history);
|
_historyRepository.Insert(history);
|
||||||
}
|
}
|
||||||
|
@ -294,6 +298,7 @@ public void Handle(DownloadFailedEvent message)
|
||||||
history.Data.Add("DownloadClient", message.DownloadClient);
|
history.Data.Add("DownloadClient", message.DownloadClient);
|
||||||
history.Data.Add("DownloadClientName", message.TrackedDownload?.DownloadItem.DownloadClientInfo.Name);
|
history.Data.Add("DownloadClientName", message.TrackedDownload?.DownloadItem.DownloadClientInfo.Name);
|
||||||
history.Data.Add("Message", message.Message);
|
history.Data.Add("Message", message.Message);
|
||||||
|
history.Data.Add("ReleaseGroup", message.TrackedDownload?.RemoteMovie?.ParsedMovieInfo?.ReleaseGroup);
|
||||||
|
|
||||||
_historyRepository.Insert(history);
|
_historyRepository.Insert(history);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue