mirror of
https://github.com/fergalmoran/Readarr.git
synced 2026-03-06 13:44:58 +00:00
@@ -80,7 +80,7 @@ namespace NzbDrone.Core.Test.MusicTests.BookMonitoredServiceTests
|
||||
Subject.SetBookMonitoredStatus(_author, new MonitoringOptions { Monitor = MonitorTypes.All });
|
||||
|
||||
Mocker.GetMock<IBookService>()
|
||||
.Verify(v => v.UpdateMany(It.Is<List<Book>>(l => l.All(e => e.Monitored))));
|
||||
.Verify(v => v.UpdateBook(It.Is<Book>(l => l.Monitored)), Times.Exactly(_books.Count));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -101,13 +101,13 @@ namespace NzbDrone.Core.Test.MusicTests.BookMonitoredServiceTests
|
||||
private void VerifyMonitored(Func<Book, bool> predicate)
|
||||
{
|
||||
Mocker.GetMock<IBookService>()
|
||||
.Verify(v => v.UpdateMany(It.Is<List<Book>>(l => l.Where(predicate).All(e => e.Monitored))));
|
||||
.Verify(v => v.UpdateBook(It.Is<Book>(b => b.Monitored)), Times.AtLeast(_books.Where(predicate).Count()));
|
||||
}
|
||||
|
||||
private void VerifyNotMonitored(Func<Book, bool> predicate)
|
||||
{
|
||||
Mocker.GetMock<IBookService>()
|
||||
.Verify(v => v.UpdateMany(It.Is<List<Book>>(l => l.Where(predicate).All(e => !e.Monitored))));
|
||||
.Verify(v => v.UpdateBook(It.Is<Book>(b => !b.Monitored)), Times.AtLeast(_books.Where(predicate).Count()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,7 +86,11 @@ namespace NzbDrone.Core.Books
|
||||
}
|
||||
}
|
||||
|
||||
_bookService.UpdateMany(books);
|
||||
// Use individual update to ensure updates are sent to frontend
|
||||
foreach (var book in books)
|
||||
{
|
||||
_bookService.UpdateBook(book);
|
||||
}
|
||||
}
|
||||
|
||||
_authorService.UpdateAuthor(author);
|
||||
|
||||
Reference in New Issue
Block a user