mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-12-31 08:09:39 +00:00
Update match all books to load items from DB, remove library items loading to memory on init
This commit is contained in:
parent
03115e5e53
commit
1dd1fe8994
19 changed files with 127 additions and 140 deletions
|
|
@ -8,8 +8,6 @@ const filePerms = require('../utils/filePerms')
|
|||
|
||||
class AuthorFinder {
|
||||
constructor() {
|
||||
this.AuthorPath = Path.join(global.MetadataPath, 'authors')
|
||||
|
||||
this.audnexus = new Audnexus()
|
||||
}
|
||||
|
||||
|
|
@ -37,7 +35,7 @@ class AuthorFinder {
|
|||
}
|
||||
|
||||
async saveAuthorImage(authorId, url) {
|
||||
var authorDir = this.AuthorPath
|
||||
var authorDir = Path.join(global.MetadataPath, 'authors')
|
||||
var relAuthorDir = Path.posix.join('/metadata', 'authors')
|
||||
|
||||
if (!await fs.pathExists(authorDir)) {
|
||||
|
|
@ -61,4 +59,4 @@ class AuthorFinder {
|
|||
}
|
||||
}
|
||||
}
|
||||
module.exports = AuthorFinder
|
||||
module.exports = new AuthorFinder()
|
||||
|
|
@ -253,4 +253,4 @@ class BookFinder {
|
|||
return this.audnexus.getChaptersByASIN(asin, region)
|
||||
}
|
||||
}
|
||||
module.exports = BookFinder
|
||||
module.exports = new BookFinder()
|
||||
|
|
@ -9,4 +9,4 @@ class MusicFinder {
|
|||
return this.musicBrainz.searchTrack(options)
|
||||
}
|
||||
}
|
||||
module.exports = MusicFinder
|
||||
module.exports = new MusicFinder()
|
||||
|
|
@ -22,4 +22,4 @@ class PodcastFinder {
|
|||
return results.map(r => r.cover).filter(r => r)
|
||||
}
|
||||
}
|
||||
module.exports = PodcastFinder
|
||||
module.exports = new PodcastFinder()
|
||||
Loading…
Add table
Add a link
Reference in a new issue