mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-06-30 04:25:03 +02:00
Add:Support for openaudible folder structure (subject to change), add support for treating single audio files in the root directory as library items #401
This commit is contained in:
parent
49bef2c641
commit
33dfb764fa
14 changed files with 110 additions and 55 deletions
|
@ -18,6 +18,7 @@ class LibraryItem {
|
|||
|
||||
this.path = null
|
||||
this.relPath = null
|
||||
this.isFile = false
|
||||
this.mtimeMs = null
|
||||
this.ctimeMs = null
|
||||
this.birthtimeMs = null
|
||||
|
@ -51,6 +52,7 @@ class LibraryItem {
|
|||
this.folderId = libraryItem.folderId
|
||||
this.path = libraryItem.path
|
||||
this.relPath = libraryItem.relPath
|
||||
this.isFile = !!libraryItem.isFile
|
||||
this.mtimeMs = libraryItem.mtimeMs || 0
|
||||
this.ctimeMs = libraryItem.ctimeMs || 0
|
||||
this.birthtimeMs = libraryItem.birthtimeMs || 0
|
||||
|
@ -82,6 +84,7 @@ class LibraryItem {
|
|||
folderId: this.folderId,
|
||||
path: this.path,
|
||||
relPath: this.relPath,
|
||||
isFile: this.isFile,
|
||||
mtimeMs: this.mtimeMs,
|
||||
ctimeMs: this.ctimeMs,
|
||||
birthtimeMs: this.birthtimeMs,
|
||||
|
@ -105,6 +108,7 @@ class LibraryItem {
|
|||
folderId: this.folderId,
|
||||
path: this.path,
|
||||
relPath: this.relPath,
|
||||
isFile: this.isFile,
|
||||
mtimeMs: this.mtimeMs,
|
||||
ctimeMs: this.ctimeMs,
|
||||
birthtimeMs: this.birthtimeMs,
|
||||
|
@ -128,6 +132,7 @@ class LibraryItem {
|
|||
folderId: this.folderId,
|
||||
path: this.path,
|
||||
relPath: this.relPath,
|
||||
isFile: this.isFile,
|
||||
mtimeMs: this.mtimeMs,
|
||||
ctimeMs: this.ctimeMs,
|
||||
birthtimeMs: this.birthtimeMs,
|
||||
|
@ -460,7 +465,7 @@ class LibraryItem {
|
|||
this.isSavingMetadata = true
|
||||
|
||||
var metadataPath = Path.join(global.MetadataPath, 'items', this.id)
|
||||
if (global.ServerSettings.storeMetadataWithItem) {
|
||||
if (global.ServerSettings.storeMetadataWithItem && !this.isFile) {
|
||||
metadataPath = this.path
|
||||
} else {
|
||||
// Make sure metadata book dir exists
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue