mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-15 07:22:28 +02:00
Fix use first accessible library depending on display order, default library id checked on server when authenticating
This commit is contained in:
parent
0dd219f303
commit
08e1782253
7 changed files with 22 additions and 24 deletions
|
@ -223,6 +223,13 @@ class User {
|
|||
return hasUpdates
|
||||
}
|
||||
|
||||
getDefaultLibraryId(libraries) {
|
||||
// Libraries should already be in ascending display order, find first accessible
|
||||
var firstAccessibleLibrary = libraries.find(lib => this.checkCanAccessLibrary(lib.id))
|
||||
if (!firstAccessibleLibrary) return null
|
||||
return firstAccessibleLibrary.id
|
||||
}
|
||||
|
||||
getMostRecentItemProgress(libraryItems) {
|
||||
if (!this.mediaProgress.length) return null
|
||||
var lip = this.mediaProgress.map(lip => lip.toJSON())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue