mirror of
https://github.com/lidarr/Lidarr
synced 2025-02-25 07:12:40 +00:00
New: Add Release group to history for all events
Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
This commit is contained in:
parent
64c2fb2dee
commit
6670aa7116
3 changed files with 11 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.Qualities;
|
using NzbDrone.Core.Qualities;
|
||||||
|
|
||||||
namespace NzbDrone.Core.Download
|
namespace NzbDrone.Core.Download
|
||||||
|
@ -13,5 +14,6 @@ public class DownloadIgnoredEvent : IEvent
|
||||||
public DownloadClientItemClientInfo DownloadClientInfo { get; set; }
|
public DownloadClientItemClientInfo DownloadClientInfo { get; set; }
|
||||||
public string DownloadId { get; set; }
|
public string DownloadId { get; set; }
|
||||||
public string Message { get; set; }
|
public string Message { get; set; }
|
||||||
|
public TrackedDownload TrackedDownload { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,6 +42,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"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -197,6 +197,7 @@ public void Handle(AlbumImportIncompleteEvent message)
|
||||||
};
|
};
|
||||||
|
|
||||||
history.Data.Add("StatusMessages", message.TrackedDownload.StatusMessages.ToJson());
|
history.Data.Add("StatusMessages", message.TrackedDownload.StatusMessages.ToJson());
|
||||||
|
history.Data.Add("ReleaseGroup", message.TrackedDownload?.RemoteAlbum?.ParsedAlbumInfo?.ReleaseGroup);
|
||||||
_historyRepository.Insert(history);
|
_historyRepository.Insert(history);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -234,6 +235,7 @@ public void Handle(TrackImportedEvent message)
|
||||||
history.Data.Add("DroppedPath", message.TrackInfo.Path);
|
history.Data.Add("DroppedPath", message.TrackInfo.Path);
|
||||||
history.Data.Add("ImportedPath", message.ImportedTrack.Path);
|
history.Data.Add("ImportedPath", message.ImportedTrack.Path);
|
||||||
history.Data.Add("DownloadClient", message.DownloadClientInfo.Name);
|
history.Data.Add("DownloadClient", message.DownloadClientInfo.Name);
|
||||||
|
history.Data.Add("ReleaseGroup", message.TrackInfo.ReleaseGroup);
|
||||||
|
|
||||||
_historyRepository.Insert(history);
|
_historyRepository.Insert(history);
|
||||||
}
|
}
|
||||||
|
@ -276,6 +278,8 @@ public void Handle(DownloadCompletedEvent message)
|
||||||
DownloadId = message.TrackedDownload.DownloadItem.DownloadId
|
DownloadId = message.TrackedDownload.DownloadItem.DownloadId
|
||||||
};
|
};
|
||||||
|
|
||||||
|
history.Data.Add("ReleaseGroup", message.TrackedDownload?.RemoteAlbum?.ParsedAlbumInfo?.ReleaseGroup);
|
||||||
|
|
||||||
_historyRepository.Insert(history);
|
_historyRepository.Insert(history);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -307,6 +311,7 @@ public void Handle(TrackFileDeletedEvent message)
|
||||||
};
|
};
|
||||||
|
|
||||||
history.Data.Add("Reason", message.Reason.ToString());
|
history.Data.Add("Reason", message.Reason.ToString());
|
||||||
|
history.Data.Add("ReleaseGroup", message.TrackFile.ReleaseGroup);
|
||||||
|
|
||||||
_historyRepository.Insert(history);
|
_historyRepository.Insert(history);
|
||||||
}
|
}
|
||||||
|
@ -332,6 +337,7 @@ public void Handle(TrackFileRenamedEvent message)
|
||||||
|
|
||||||
history.Data.Add("SourcePath", sourcePath);
|
history.Data.Add("SourcePath", sourcePath);
|
||||||
history.Data.Add("Path", path);
|
history.Data.Add("Path", path);
|
||||||
|
history.Data.Add("ReleaseGroup", message.TrackFile.ReleaseGroup);
|
||||||
|
|
||||||
_historyRepository.Insert(history);
|
_historyRepository.Insert(history);
|
||||||
}
|
}
|
||||||
|
@ -355,6 +361,7 @@ public void Handle(TrackFileRetaggedEvent message)
|
||||||
};
|
};
|
||||||
|
|
||||||
history.Data.Add("TagsScrubbed", message.Scrubbed.ToString());
|
history.Data.Add("TagsScrubbed", message.Scrubbed.ToString());
|
||||||
|
history.Data.Add("ReleaseGroup", message.TrackFile.ReleaseGroup);
|
||||||
history.Data.Add("Diff", message.Diff.Select(x => new
|
history.Data.Add("Diff", message.Diff.Select(x => new
|
||||||
{
|
{
|
||||||
Field = x.Key,
|
Field = x.Key,
|
||||||
|
@ -388,6 +395,7 @@ public void Handle(DownloadIgnoredEvent message)
|
||||||
};
|
};
|
||||||
|
|
||||||
history.Data.Add("DownloadClient", message.DownloadClientInfo.Name);
|
history.Data.Add("DownloadClient", message.DownloadClientInfo.Name);
|
||||||
|
history.Data.Add("ReleaseGroup", message.TrackedDownload?.RemoteAlbum?.ParsedAlbumInfo?.ReleaseGroup);
|
||||||
history.Data.Add("Message", message.Message);
|
history.Data.Add("Message", message.Message);
|
||||||
|
|
||||||
historyToAdd.Add(history);
|
historyToAdd.Add(history);
|
||||||
|
|
Loading…
Reference in a new issue