mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-10 22:09:38 +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) {
|
async getMediaFinished(library, user, include, limit) {
|
||||||
if (library.isBook) {
|
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 {
|
return {
|
||||||
items: libraryItems.map((li) => {
|
items: libraryItems.map((li) => {
|
||||||
const oldLibraryItem = li.toOldJSONMinified()
|
const oldLibraryItem = li.toOldJSONMinified()
|
||||||
|
|
@ -179,7 +179,7 @@ module.exports = {
|
||||||
count
|
count
|
||||||
}
|
}
|
||||||
} else {
|
} 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 {
|
return {
|
||||||
count,
|
count,
|
||||||
items: libraryItems.map((li) => {
|
items: libraryItems.map((li) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue