Changed library search via API to use search context.
This commit is contained in:
@ -54,7 +54,7 @@ export class LibraryConsumer extends WorkerHost {
|
||||
const series: SeriesSubscriptionJobDto = job.data;
|
||||
const existingBooks = await this.library.findBooksFromSeries(series);
|
||||
const existingVolumes = existingBooks.map(b => b.volume);
|
||||
const lastPublishedBook = existingBooks.sort((a, b) => b.publishedAt.getTime() - a.publishedAt.getTime())[0];
|
||||
const lastPublishedBook = existingBooks.reduce((a, b) => a.publishedAt.getTime() > b.publishedAt.getTime() ? a : b);
|
||||
const books = await this.search(job, series, lastPublishedBook?.publishedAt);
|
||||
|
||||
let counter = 0;
|
||||
|
Reference in New Issue
Block a user