Support multi library 1.4.0

This commit is contained in:
advplyr 2021-10-05 21:10:49 -05:00
parent a65f7e6fad
commit d9d34e87e0
29 changed files with 452 additions and 188 deletions

View file

@ -107,6 +107,7 @@ function getFileType(ext) {
if (ext_cleaned.startsWith('.')) ext_cleaned = ext_cleaned.slice(1)
if (globals.SupportedAudioTypes.includes(ext_cleaned)) return 'audio'
if (ext_cleaned === 'nfo') return 'info'
if (ext_cleaned === 'txt') return 'text'
if (globals.SupportedImageTypes.includes(ext_cleaned)) return 'image'
if (globals.SupportedEbookTypes.includes(ext_cleaned)) return 'ebook'
return 'unknown'
@ -243,6 +244,7 @@ async function getAudiobookFileData(folder, audiobookPath, serverSettings = {})
var audiobookDir = Path.normalize(audiobookPath).replace(folder.fullPath, '').slice(1)
var audiobookData = getAudiobookDataFromDir(folder.fullPath, audiobookDir, parseSubtitle)
var audiobook = {
ino: await getIno(audiobookData.fullPath),
folderId: folder.id,
libraryId: folder.libraryId,
...audiobookData,