diff --git a/client/pages/config/backups.vue b/client/pages/config/backups.vue index 17fc2021..ba6ff2be 100644 --- a/client/pages/config/backups.vue +++ b/client/pages/config/backups.vue @@ -107,7 +107,7 @@ export default { this.$toast.error('Invalid number of backups to keep') return } - var updatePayload = { + const updatePayload = { backupSchedule: this.enableBackups ? this.cronExpression : false, backupsToKeep: Number(this.backupsToKeep), maxBackupSize: Number(this.maxBackupSize) diff --git a/server/utils/migrations/dbMigration.js b/server/utils/migrations/dbMigration.js index 35877fb6..12685371 100644 --- a/server/utils/migrations/dbMigration.js +++ b/server/utils/migrations/dbMigration.js @@ -151,8 +151,8 @@ function migratePodcast(oldLibraryItem, LibraryItem) { autoDownloadEpisodes: !!oldPodcast.autoDownloadEpisodes, autoDownloadSchedule: oldPodcast.autoDownloadSchedule, lastEpisodeCheck: oldPodcast.lastEpisodeCheck, - maxEpisodesToKeep: oldPodcast.maxEpisodesToKeep, - maxNewEpisodesToDownload: oldPodcast.maxNewEpisodesToDownload, + maxEpisodesToKeep: oldPodcast.maxEpisodesToKeep || 0, + maxNewEpisodesToDownload: oldPodcast.maxNewEpisodesToDownload || 3, lastCoverSearchQuery: oldPodcast.lastCoverSearchQuery, lastCoverSearch: oldPodcast.lastCoverSearch, createdAt: LibraryItem.createdAt, @@ -189,7 +189,7 @@ function migratePodcast(oldLibraryItem, LibraryItem) { updatedAt: oldEpisode.updatedAt, podcastId: Podcast.id, audioFile: oldEpisode.audioFile, - chapters: oldEpisode.chapters + chapters: oldEpisode.chapters || [] } newRecords.podcastEpisode.push(PodcastEpisode) oldDbIdMap.podcastEpisodes[oldEpisode.id] = PodcastEpisode.id