Update match all books to load items from DB, remove library items loading to memory on init

This commit is contained in:
advplyr
2023-09-04 16:33:55 -05:00
parent 03115e5e53
commit 1dd1fe8994
19 changed files with 127 additions and 140 deletions
+2 -4
View File
@@ -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()
+1 -1
View File
@@ -253,4 +253,4 @@ class BookFinder {
return this.audnexus.getChaptersByASIN(asin, region)
}
}
module.exports = BookFinder
module.exports = new BookFinder()
+1 -1
View File
@@ -9,4 +9,4 @@ class MusicFinder {
return this.musicBrainz.searchTrack(options)
}
}
module.exports = MusicFinder
module.exports = new MusicFinder()
+1 -1
View File
@@ -22,4 +22,4 @@ class PodcastFinder {
return results.map(r => r.cover).filter(r => r)
}
}
module.exports = PodcastFinder
module.exports = new PodcastFinder()