Cleaning up, adding readme and images, genre filter

This commit is contained in:
Mark Cooper committed 2021-08-19 17:29:36 -05:00
1 parent 53e46ff54d
commit 307b5b83a9
25 files changed
+269 -65

No files matched your search

+18
View File
@@ -154,5 +154,23 @@ class Db {
Logger.error(`[DB] Remove entity ${entityName} Failed: ${error}`)
})
}
getGenres() {
var allGenres = []
this.db.audiobooks.forEach((audiobook) => {
allGenres = allGenres.concat(audiobook.genres)
})
allGenres = [...new Set(allGenres)] // Removes duplicates
return allGenres
}
getTags() {
var allTags = []
this.db.audiobooks.forEach((audiobook) => {
allTags = allTags.concat(audiobook.tags)
})
allTags = [...new Set(allTags)] // Removes duplicates
return allTags
}
}
module.exports = Db