mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-02-20 13:53:19 +01:00
Fix: book id length & check duplicate ids, Change: library to lazy load book cards
This commit is contained in:
@@ -58,3 +58,9 @@ const xmlToJSON = (xml) => {
|
||||
})
|
||||
}
|
||||
module.exports.xmlToJSON = xmlToJSON
|
||||
|
||||
module.exports.getId = (prepend = '') => {
|
||||
var _id = Math.random().toString(36).substring(2, 8) + Math.random().toString(36).substring(2, 8) + Math.random().toString(36).substring(2, 8)
|
||||
if (prepend) return prepend + '_' + _id
|
||||
return _id
|
||||
}
|
||||
Reference in New Issue
Block a user