Update:Only load feeds when needed

This commit is contained in:
advplyr 2023-07-17 16:48:46 -05:00
parent 20c11e381e
commit 6814adffcc
10 changed files with 125 additions and 55 deletions

View file

@ -23,7 +23,6 @@ class Database {
this.playlists = []
this.authors = []
this.series = []
this.feeds = []
this.serverSettings = null
this.notificationSettings = null
@ -147,7 +146,6 @@ class Database {
this.playlists = await this.models.playlist.getOldPlaylists()
this.authors = await this.models.author.getOldAuthors()
this.series = await this.models.series.getAllOldSeries()
this.feeds = await this.models.feed.getOldFeeds()
Logger.info(`[Database] Db data loaded in ${Date.now() - startTime}ms`)
@ -408,7 +406,6 @@ class Database {
async createFeed(oldFeed) {
if (!this.sequelize) return false
await this.models.feed.fullCreateFromOld(oldFeed)
this.feeds.push(oldFeed)
}
updateFeed(oldFeed) {
@ -419,7 +416,6 @@ class Database {
async removeFeed(feedId) {
if (!this.sequelize) return false
await this.models.feed.removeById(feedId)
this.feeds = this.feeds.filter(f => f.id !== feedId)
}
updateSeries(oldSeries) {