mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-03-07 00:19:41 +00:00
Compare commits
No commits in common. "ec05bd36e41dbd209d7b31b7b810c6fa38afdb8f" and "be041f93c245a3fd97dbde8f6eabc60e0cae7ed6" have entirely different histories.
ec05bd36e4
...
be041f93c2
1 changed files with 3 additions and 7 deletions
|
|
@ -215,13 +215,9 @@ class FeedEpisode extends Model {
|
|||
* @returns {Promise<FeedEpisode[]>}
|
||||
*/
|
||||
static async createFromBooks(books, feed, slug, transaction) {
|
||||
// This is never null unless the books array is empty, as this method is not invoked when no books. Reduce needs an initial item
|
||||
const earliestLibraryItemCreatedAt =
|
||||
books.length > 0
|
||||
? books.reduce((earliest, book) => {
|
||||
return book.libraryItem.createdAt < earliest.libraryItem.createdAt ? book : earliest
|
||||
}).libraryItem.createdAt
|
||||
: null
|
||||
const earliestLibraryItemCreatedAt = books.reduce((earliest, book) => {
|
||||
return book.libraryItem.createdAt < earliest.libraryItem.createdAt ? book : earliest
|
||||
}).libraryItem.createdAt
|
||||
|
||||
const feedEpisodeObjs = []
|
||||
let numExisting = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue