From c14d13440ff9f7aeef47bce4cda6f35f87d3633e Mon Sep 17 00:00:00 2001 From: mfcar Date: Wed, 22 Feb 2023 12:48:12 +0000 Subject: [PATCH 1/2] Add explicit info --- client/components/cards/BookMatchCard.vue | 4 ++-- client/components/cards/LazyBookCard.vue | 5 +++- client/components/modals/item/tabs/Match.vue | 8 +++++++ client/components/modals/podcast/NewModal.vue | 23 +++++++++++++++---- .../components/widgets/ExplicitIndicator.vue | 17 ++++++++++++++ client/pages/item/_id/index.vue | 5 +++- .../pages/library/_library/podcast/latest.vue | 6 ++--- .../pages/library/_library/podcast/search.vue | 4 ++-- server/providers/iTunes.js | 5 ++-- 9 files changed, 62 insertions(+), 15 deletions(-) create mode 100644 client/components/widgets/ExplicitIndicator.vue diff --git a/client/components/cards/BookMatchCard.vue b/client/components/cards/BookMatchCard.vue index d458664f..a7cfb4a7 100644 --- a/client/components/cards/BookMatchCard.vue +++ b/client/components/cards/BookMatchCard.vue @@ -28,7 +28,7 @@
-

{{ book.title }}

+

{{ book.title }}

by {{ book.author }}

{{ book.genres.join(', ') }}

{{ book.trackCount }} Episodes

@@ -78,4 +78,4 @@ export default { this.selectedCover = this.bookCovers.length ? this.bookCovers[0] : this.book.cover || null } } - \ No newline at end of file + diff --git a/client/components/cards/LazyBookCard.vue b/client/components/cards/LazyBookCard.vue index 38bbb76a..7d27dac6 100644 --- a/client/components/cards/LazyBookCard.vue +++ b/client/components/cards/LazyBookCard.vue @@ -8,7 +8,7 @@

- {{ displayTitle }} + {{ displayTitle }}

{{ displayLineTwo || ' ' }}

{{ displaySortLine }}

@@ -193,6 +193,9 @@ export default { isMusic() { return this.mediaType === 'music' }, + isExplicit() { + return this.mediaMetadata.explicit || false + }, placeholderUrl() { const config = this.$config || this.$nuxt.$config return `${config.routerBasePath}/book_placeholder.jpg` diff --git a/client/components/modals/item/tabs/Match.vue b/client/components/modals/item/tabs/Match.vue index 6749c730..6cc1e1ba 100644 --- a/client/components/modals/item/tabs/Match.vue +++ b/client/components/modals/item/tabs/Match.vue @@ -164,6 +164,13 @@

{{ $strings.LabelCurrently }} {{ mediaMetadata.releaseDate || '' }}

+
+ +
+ +

{{ $strings.LabelCurrently }} {{ mediaMetadata.explicit ? 'Explicit (checked)' : 'Not Explicit (unchecked)' }}

+
+
{{ $strings.ButtonSubmit }} @@ -327,6 +334,7 @@ export default { res.itunesPageUrl = res.pageUrl || null res.itunesId = res.id || null res.author = res.artistName || null + res.explicit = res.explicit || false return res }) } diff --git a/client/components/modals/podcast/NewModal.vue b/client/components/modals/podcast/NewModal.vue index 59b8dfd9..e64beb4c 100644 --- a/client/components/modals/podcast/NewModal.vue +++ b/client/components/modals/podcast/NewModal.vue @@ -28,6 +28,14 @@
+
+
+ +
+
+ +
+
@@ -82,7 +90,9 @@ export default { itunesPageUrl: '', itunesId: '', itunesArtistId: '', - autoDownloadEpisodes: false + autoDownloadEpisodes: false, + language: '', + explicit: false } } }, @@ -170,7 +180,8 @@ export default { itunesPageUrl: this.podcast.itunesPageUrl, itunesId: this.podcast.itunesId, itunesArtistId: this.podcast.itunesArtistId, - language: this.podcast.language + language: this.podcast.language, + explicit: this.podcast.explicit }, autoDownloadEpisodes: this.podcast.autoDownloadEpisodes } @@ -205,9 +216,13 @@ export default { this.podcast.itunesPageUrl = this._podcastData.pageUrl || '' this.podcast.itunesId = this._podcastData.id || '' this.podcast.itunesArtistId = this._podcastData.artistId || '' - this.podcast.language = this._podcastData.language || '' + this.podcast.language = this._podcastData.language || this.feedMetadata.language || '' this.podcast.autoDownloadEpisodes = false + if (this._podcastData.explicit === 'yes' || this._podcastData.explicit == 'true' || this.feedMetadata.explicit === 'yes' || this.feedMetadata.explicit == 'true') { + this.podcast.explicit = true + } else this.podcast.explicit = false + if (this.folderItems[0]) { this.selectedFolderId = this.folderItems[0].value this.folderUpdated() @@ -226,4 +241,4 @@ export default { #episodes-scroll { max-height: calc(80vh - 200px); } - \ No newline at end of file + diff --git a/client/components/widgets/ExplicitIndicator.vue b/client/components/widgets/ExplicitIndicator.vue new file mode 100644 index 00000000..833aef7c --- /dev/null +++ b/client/components/widgets/ExplicitIndicator.vue @@ -0,0 +1,17 @@ + + + diff --git a/client/pages/item/_id/index.vue b/client/pages/item/_id/index.vue index ef99cefb..728868be 100644 --- a/client/pages/item/_id/index.vue +++ b/client/pages/item/_id/index.vue @@ -25,7 +25,7 @@

- {{ title }} + {{ title }}

{{ bookSubtitle }}

@@ -315,6 +315,9 @@ export default { isInvalid() { return this.libraryItem.isInvalid }, + isExplicit() { + return this.mediaMetadata.explicit || false; + }, invalidAudioFiles() { if (!this.isBook) return [] return this.libraryItem.media.audioFiles.filter((af) => af.invalid) diff --git a/client/pages/library/_library/podcast/latest.vue b/client/pages/library/_library/podcast/latest.vue index 43eff416..8b4163c1 100644 --- a/client/pages/library/_library/podcast/latest.vue +++ b/client/pages/library/_library/podcast/latest.vue @@ -14,14 +14,14 @@
- {{ episode.podcast.metadata.title }} + {{ episode.podcast.metadata.title }}

{{ $dateDistanceFromNow(episode.publishedAt) }}

@@ -206,4 +206,4 @@ export default { this.loadRecentEpisodes() } } - \ No newline at end of file + diff --git a/client/pages/library/_library/podcast/search.vue b/client/pages/library/_library/podcast/search.vue index 7bbf3de3..4d620d2d 100644 --- a/client/pages/library/_library/podcast/search.vue +++ b/client/pages/library/_library/podcast/search.vue @@ -20,7 +20,7 @@
- {{ podcast.title }} + {{ podcast.title }}

by {{ podcast.artistName }}

{{ podcast.genres.join(', ') }}

{{ podcast.trackCount }} {{ $strings.HeaderEpisodes }}

@@ -171,4 +171,4 @@ export default { }, mounted() {} } - \ No newline at end of file + diff --git a/server/providers/iTunes.js b/server/providers/iTunes.js index bdea2286..39f36ab2 100644 --- a/server/providers/iTunes.js +++ b/server/providers/iTunes.js @@ -95,7 +95,8 @@ class iTunes { cover: this.getCoverArtwork(data), trackCount: data.trackCount, feedUrl: data.feedUrl, - pageUrl: data.collectionViewUrl + pageUrl: data.collectionViewUrl, + explicit: data.trackExplicitness === 'explicit' } } @@ -105,4 +106,4 @@ class iTunes { }) } } -module.exports = iTunes \ No newline at end of file +module.exports = iTunes From 9c3f5406a9c089e45c1bba58f9b420945d003a3c Mon Sep 17 00:00:00 2001 From: advplyr <67830747+advplyr@users.noreply.github.com> Date: Wed, 22 Feb 2023 17:36:42 -0600 Subject: [PATCH 2/2] Update client/components/modals/podcast/NewModal.vue --- client/components/modals/podcast/NewModal.vue | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/client/components/modals/podcast/NewModal.vue b/client/components/modals/podcast/NewModal.vue index e64beb4c..bdfa56e4 100644 --- a/client/components/modals/podcast/NewModal.vue +++ b/client/components/modals/podcast/NewModal.vue @@ -219,10 +219,7 @@ export default { this.podcast.language = this._podcastData.language || this.feedMetadata.language || '' this.podcast.autoDownloadEpisodes = false - if (this._podcastData.explicit === 'yes' || this._podcastData.explicit == 'true' || this.feedMetadata.explicit === 'yes' || this.feedMetadata.explicit == 'true') { - this.podcast.explicit = true - } else this.podcast.explicit = false - + this.podcast.explicit = this._podcastData.explicit || this.feedMetadata.explicit === 'yes' || this.feedMetadata.explicit == 'true' if (this.folderItems[0]) { this.selectedFolderId = this.folderItems[0].value this.folderUpdated()