diff --git a/client/components/modals/podcast/EditEpisode.vue b/client/components/modals/podcast/EditEpisode.vue index 6d715f21..fe482f2f 100644 --- a/client/components/modals/podcast/EditEpisode.vue +++ b/client/components/modals/podcast/EditEpisode.vue @@ -14,7 +14,7 @@
- +
@@ -55,8 +55,10 @@ export default { title: null, subtitle: null, description: null, - pubDate: null - } + pubDate: null, + publishedAt: null + }, + pubDateInput: null } }, watch: { @@ -85,6 +87,15 @@ export default { } }, methods: { + updatePubDate(val) { + if (val) { + this.newEpisode.pubDate = this.$formatJsDate(new Date(val), 'E, d MMM yyyy HH:mm:ssxx') + this.newEpisode.publishedAt = new Date(val).valueOf() + } else { + this.newEpisode.pubDate = null + this.newEpisode.publishedAt = null + } + }, init() { this.newEpisode.episode = this.episode.episode || '' this.newEpisode.episodeType = this.episode.episodeType || '' @@ -92,6 +103,9 @@ export default { this.newEpisode.subtitle = this.episode.subtitle || '' this.newEpisode.description = this.episode.description || '' this.newEpisode.pubDate = this.episode.pubDate || '' + this.newEpisode.publishedAt = this.episode.publishedAt + + this.pubDateInput = this.episode.pubDate ? this.$formatJsDate(new Date(this.episode.pubDate), "yyyy-MM-dd'T'HH:mm") : null }, getUpdatePayload() { var updatePayload = {} diff --git a/client/components/ui/TextInput.vue b/client/components/ui/TextInput.vue index 5366ecb0..b7244688 100644 --- a/client/components/ui/TextInput.vue +++ b/client/components/ui/TextInput.vue @@ -83,4 +83,7 @@ input:read-only { color: #bbb; background-color: #444; } +input::-webkit-calendar-picker-indicator { + filter: invert(1); +} \ No newline at end of file diff --git a/client/store/index.js b/client/store/index.js index 64b18511..0c644400 100644 --- a/client/store/index.js +++ b/client/store/index.js @@ -34,7 +34,7 @@ export const getters = { return state.serverSettings[key] }, getBookCoverAspectRatio: state => { - if (!state.serverSettings || !state.serverSettings.coverAspectRatio) return 1.6 + if (!state.serverSettings || !state.serverSettings.coverAspectRatio) return 1 return state.serverSettings.coverAspectRatio === 0 ? 1.6 : 1 }, getNumLibraryItemsSelected: state => state.selectedLibraryItems.length, diff --git a/server/managers/PodcastManager.js b/server/managers/PodcastManager.js index e7eea417..616ae658 100644 --- a/server/managers/PodcastManager.js +++ b/server/managers/PodcastManager.js @@ -79,6 +79,9 @@ class PodcastManager { async scanAddPodcastEpisodeAudioFile() { var libraryFile = await this.getLibraryFile(this.currentDownload.targetPath, this.currentDownload.targetRelPath) + + // TODO: Set meta tags on new audio file + var audioFile = await this.probeAudioFile(libraryFile) if (!audioFile) { return false