mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-09 05:19:37 +00:00
sort randomly
This commit is contained in:
parent
9960986e6e
commit
e9df238b80
1 changed files with 2 additions and 2 deletions
|
|
@ -164,7 +164,7 @@ module.exports = {
|
|||
*/
|
||||
async getMediaFinished(library, user, include, limit) {
|
||||
if (library.isBook) {
|
||||
const { libraryItems, count } = await libraryItemsBookFilters.getFilteredLibraryItems(library.id, user, 'progress', 'finished', 'progress', true, false, include, limit, 0)
|
||||
const { libraryItems, count } = await libraryItemsBookFilters.getFilteredLibraryItems(library.id, user, 'progress', 'finished', 'random', true, false, include, limit, 0)
|
||||
return {
|
||||
items: libraryItems.map((li) => {
|
||||
const oldLibraryItem = li.toOldJSONMinified()
|
||||
|
|
@ -179,7 +179,7 @@ module.exports = {
|
|||
count
|
||||
}
|
||||
} else {
|
||||
const { libraryItems, count } = await libraryItemsPodcastFilters.getFilteredPodcastEpisodes(library.id, user, 'progress', 'finished', 'progress', true, limit, 0)
|
||||
const { libraryItems, count } = await libraryItemsPodcastFilters.getFilteredPodcastEpisodes(library.id, user, 'progress', 'finished', 'random', true, limit, 0)
|
||||
return {
|
||||
count,
|
||||
items: libraryItems.map((li) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue