mirror of
https://github.com/Readarr/Readarr
synced 2025-12-24 01:03:32 +01:00
Fixed: Don't repeatedly refresh queue when author deleted
This commit is contained in:
parent
3c4c6b855e
commit
8b19f02ade
1 changed files with 12 additions and 9 deletions
|
|
@ -56,18 +56,21 @@ public void UpdateBookCache(int bookId)
|
|||
{
|
||||
var updateCacheItems = _cache.Values.Where(x => x.RemoteBook != null && x.RemoteBook.Books.Any(a => a.Id == bookId)).ToList();
|
||||
|
||||
foreach (var item in updateCacheItems)
|
||||
if (updateCacheItems.Any())
|
||||
{
|
||||
var parsedBookInfo = Parser.Parser.ParseBookTitle(item.DownloadItem.Title);
|
||||
item.RemoteBook = null;
|
||||
|
||||
if (parsedBookInfo != null)
|
||||
foreach (var item in updateCacheItems)
|
||||
{
|
||||
item.RemoteBook = _parsingService.Map(parsedBookInfo);
|
||||
}
|
||||
}
|
||||
var parsedBookInfo = Parser.Parser.ParseBookTitle(item.DownloadItem.Title);
|
||||
item.RemoteBook = null;
|
||||
|
||||
_eventAggregator.PublishEvent(new TrackedDownloadRefreshedEvent(GetTrackedDownloads()));
|
||||
if (parsedBookInfo != null)
|
||||
{
|
||||
item.RemoteBook = _parsingService.Map(parsedBookInfo);
|
||||
}
|
||||
}
|
||||
|
||||
_eventAggregator.PublishEvent(new TrackedDownloadRefreshedEvent(GetTrackedDownloads()));
|
||||
}
|
||||
}
|
||||
|
||||
public void StopTracking(string downloadId)
|
||||
|
|
|
|||
Loading…
Reference in a new issue