Update dbMigration mappings

This commit is contained in:
advplyr 2023-07-14 14:04:28 -05:00
parent e40e0bfa25
commit 9b7aacf3ea
2 changed files with 4 additions and 4 deletions

View File

@ -107,7 +107,7 @@ export default {
this.$toast.error('Invalid number of backups to keep') this.$toast.error('Invalid number of backups to keep')
return return
} }
var updatePayload = { const updatePayload = {
backupSchedule: this.enableBackups ? this.cronExpression : false, backupSchedule: this.enableBackups ? this.cronExpression : false,
backupsToKeep: Number(this.backupsToKeep), backupsToKeep: Number(this.backupsToKeep),
maxBackupSize: Number(this.maxBackupSize) maxBackupSize: Number(this.maxBackupSize)

View File

@ -151,8 +151,8 @@ function migratePodcast(oldLibraryItem, LibraryItem) {
autoDownloadEpisodes: !!oldPodcast.autoDownloadEpisodes, autoDownloadEpisodes: !!oldPodcast.autoDownloadEpisodes,
autoDownloadSchedule: oldPodcast.autoDownloadSchedule, autoDownloadSchedule: oldPodcast.autoDownloadSchedule,
lastEpisodeCheck: oldPodcast.lastEpisodeCheck, lastEpisodeCheck: oldPodcast.lastEpisodeCheck,
maxEpisodesToKeep: oldPodcast.maxEpisodesToKeep, maxEpisodesToKeep: oldPodcast.maxEpisodesToKeep || 0,
maxNewEpisodesToDownload: oldPodcast.maxNewEpisodesToDownload, maxNewEpisodesToDownload: oldPodcast.maxNewEpisodesToDownload || 3,
lastCoverSearchQuery: oldPodcast.lastCoverSearchQuery, lastCoverSearchQuery: oldPodcast.lastCoverSearchQuery,
lastCoverSearch: oldPodcast.lastCoverSearch, lastCoverSearch: oldPodcast.lastCoverSearch,
createdAt: LibraryItem.createdAt, createdAt: LibraryItem.createdAt,
@ -189,7 +189,7 @@ function migratePodcast(oldLibraryItem, LibraryItem) {
updatedAt: oldEpisode.updatedAt, updatedAt: oldEpisode.updatedAt,
podcastId: Podcast.id, podcastId: Podcast.id,
audioFile: oldEpisode.audioFile, audioFile: oldEpisode.audioFile,
chapters: oldEpisode.chapters chapters: oldEpisode.chapters || []
} }
newRecords.podcastEpisode.push(PodcastEpisode) newRecords.podcastEpisode.push(PodcastEpisode)
oldDbIdMap.podcastEpisodes[oldEpisode.id] = PodcastEpisode.id oldDbIdMap.podcastEpisodes[oldEpisode.id] = PodcastEpisode.id