diff --git a/.gitignore b/.gitignore index c2865a2b..769b0639 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ node_modules/ /config/ /audiobooks/ /audiobooks2/ +/podcasts/ /media/ /metadata/ test/ diff --git a/client/components/modals/podcast/EpisodeFeed.vue b/client/components/modals/podcast/EpisodeFeed.vue index a37f0ea2..8ca563c7 100644 --- a/client/components/modals/podcast/EpisodeFeed.vue +++ b/client/components/modals/podcast/EpisodeFeed.vue @@ -29,6 +29,14 @@
+
+
+ +
+
+

Select all episodes

+
+
{{ buttonText }}
@@ -67,6 +75,20 @@ export default { if (!this.libraryItem) return '' return this.libraryItem.media.metadata.title || 'Unknown' }, + allSelected() { + try { + const values = Object.values(this.selectedEpisodes).filter((_, index) => !(this.episodes[index].enclosure && this.itemEpisodeMap[this.episodes[index].enclosure.url])) + + if(!values.length) return false + return values.filter(episode => !episode).length === 0 + } catch(error) { + console.error("Error while filtering selected episodes", error); + return false + } + }, + allDownloaded() { + return Object.values(this.episodes).filter(episode => !(episode.enclosure && this.itemEpisodeMap[episode.enclosure.url])).length === 0 + }, episodesSelected() { return Object.keys(this.selectedEpisodes).filter((key) => !!this.selectedEpisodes[key]) }, diff --git a/client/components/modals/podcast/NewModal.vue b/client/components/modals/podcast/NewModal.vue index e3b4cf06..1ced6c74 100644 --- a/client/components/modals/podcast/NewModal.vue +++ b/client/components/modals/podcast/NewModal.vue @@ -39,6 +39,14 @@

Episodes

+
+
+ +
+
+

Select all episodes

+
+
@@ -149,6 +157,9 @@ export default { if (!this.podcastFeedData) return [] return this.podcastFeedData.episodes || [] }, + allSelected() { + return Object.values(this.selectedEpisodes).filter(episode => !episode).length === 0 + }, episodesSelected() { return Object.keys(this.selectedEpisodes).filter((key) => !!this.selectedEpisodes[key]) }, diff --git a/server/Server.js b/server/Server.js index 98d4c154..a7fac9b0 100644 --- a/server/Server.js +++ b/server/Server.js @@ -150,8 +150,8 @@ class Server { app.use(this.auth.cors) app.use(fileUpload()) - app.use(express.urlencoded({ extended: true })); - app.use(express.json()) + app.use(express.urlencoded({ extended: true, limit: "3mb" })); + app.use(express.json({ limit: "3mb" })) // Static path to generated nuxt const distPath = Path.join(global.appRoot, '/client/dist')