mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-11-20 23:51:35 +01:00
Fix: book id length & check duplicate ids, Change: library to lazy load book cards
This commit is contained in:
1 parent
ca6f2c01f6
commit
72f9732b67
18 files changed
+466
-86
No files matched your search
@@ -1,4 +1,5 @@
|
||||
const Logger = require('../Logger')
|
||||
const { getId } = require('../utils/index')
|
||||
|
||||
class UserCollection {
|
||||
constructor(collection) {
|
||||
@@ -62,7 +63,7 @@ class UserCollection {
|
||||
if (!data.userId || !data.libraryId || !data.name) {
|
||||
return false
|
||||
}
|
||||
this.id = (Math.trunc(Math.random() * 1000) + Date.now()).toString(36)
|
||||
this.id = getId('usr')
|
||||
this.userId = data.userId
|
||||
this.libraryId = data.libraryId
|
||||
this.name = data.name
|
||||
|
||||
Reference in new issue
Block a user