mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-12-05 14:36:27 +01:00
Add:Create playlist from a collection #1226
This commit is contained in:
1 parent
9b1f7f566f
commit
5165f11460
6 files changed
+143
-12
No files matched your search
@@ -38,10 +38,10 @@ class Collection {
|
||||
}
|
||||
|
||||
toJSONExpanded(libraryItems, minifiedBooks = false) {
|
||||
var json = this.toJSON()
|
||||
const json = this.toJSON()
|
||||
json.books = json.books.map(bookId => {
|
||||
var _ab = libraryItems.find(li => li.id === bookId)
|
||||
return _ab ? minifiedBooks ? _ab.toJSONMinified() : _ab.toJSONExpanded() : null
|
||||
const book = libraryItems.find(li => li.id === bookId)
|
||||
return book ? minifiedBooks ? book.toJSONMinified() : book.toJSONExpanded() : null
|
||||
}).filter(b => !!b)
|
||||
return json
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user