mirror of
https://github.com/Radarr/Radarr
synced 2025-01-19 22:21:08 +00:00
Workaround to deal with updating scene names
This commit is contained in:
parent
438686ca1a
commit
027ed1335f
1 changed files with 3 additions and 3 deletions
|
@ -91,8 +91,7 @@ public void MarkAsFailed(Int32 historyId)
|
||||||
var item = _historyService.Get(historyId);
|
var item = _historyService.Get(historyId);
|
||||||
|
|
||||||
var trackedDownload = GetTrackedDownloads()
|
var trackedDownload = GetTrackedDownloads()
|
||||||
.Where(h => h.DownloadItem.DownloadClientId.Equals(item.Data.GetValueOrDefault(DOWNLOAD_CLIENT_ID)))
|
.FirstOrDefault(h => h.DownloadItem.DownloadClientId.Equals(item.Data.GetValueOrDefault(DOWNLOAD_CLIENT_ID)));
|
||||||
.FirstOrDefault();
|
|
||||||
|
|
||||||
if (trackedDownload != null && trackedDownload.State == TrackedDownloadState.Unknown)
|
if (trackedDownload != null && trackedDownload.State == TrackedDownloadState.Unknown)
|
||||||
{
|
{
|
||||||
|
@ -144,7 +143,8 @@ private Boolean UpdateTrackedDownloads(List<History.History> grabbedHistory)
|
||||||
|
|
||||||
if (newTrackedDownloads.ContainsKey(trackingId)) continue;
|
if (newTrackedDownloads.ContainsKey(trackingId)) continue;
|
||||||
|
|
||||||
if (!oldTrackedDownloads.TryGetValue(trackingId, out trackedDownload))
|
//TODO: Rebuilding the tracked download when it is a warning is a total hack to deal with updated scene mappings
|
||||||
|
if (!oldTrackedDownloads.TryGetValue(trackingId, out trackedDownload) || trackedDownload.Status == TrackedDownloadStatus.Warning)
|
||||||
{
|
{
|
||||||
trackedDownload = GetTrackedDownload(trackingId, downloadClient.Definition.Id, downloadItem, grabbedHistory);
|
trackedDownload = GetTrackedDownload(trackingId, downloadClient.Definition.Id, downloadItem, grabbedHistory);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue