Fixed: Book files disappearing

pull/965/head
ta264 4 years ago
parent 3940d4aa28
commit 399ee8d2e7

@ -302,9 +302,8 @@ namespace NzbDrone.Core.Books
return;
}
var toMonitor = monitored.OrderByDescending(x => _mediaFileService.GetFilesByEdition(x.Id).Count)
.ThenByDescending(x => x.Ratings.Popularity)
.First();
var toMonitor = monitored.OrderByDescending(x => x.Id > 0 ? _mediaFileService.GetFilesByEdition(x.Id).Count : 0)
.ThenByDescending(x => x.Ratings.Popularity).First();
monitored.ForEach(x => x.Monitored = false);
toMonitor.Monitored = true;

Loading…
Cancel
Save