diff --git a/client/components/app/BookShelfToolbar.vue b/client/components/app/BookShelfToolbar.vue
index 124c332d..d512bc1b 100644
--- a/client/components/app/BookShelfToolbar.vue
+++ b/client/components/app/BookShelfToolbar.vue
@@ -64,12 +64,22 @@
+
+
+
+
+
+
+
+
+
+
{{ $strings.ButtonRemoveAll }} {{ numShowing }} {{ entityName }}
diff --git a/client/components/widgets/AlreadyInLibraryIndicator.vue b/client/components/widgets/AlreadyInLibraryIndicator.vue
index 53bc31b3..e765b4e2 100644
--- a/client/components/widgets/AlreadyInLibraryIndicator.vue
+++ b/client/components/widgets/AlreadyInLibraryIndicator.vue
@@ -1,6 +1,6 @@
- check_circle
+ check_circle
diff --git a/client/pages/library/_library/podcast/search.vue b/client/pages/library/_library/podcast/search.vue
index bef8280b..428441f9 100644
--- a/client/pages/library/_library/podcast/search.vue
+++ b/client/pages/library/_library/podcast/search.vue
@@ -155,6 +155,7 @@ export default {
let podcast = this.existentPodcasts.find((p) => p.itunesId === result.id || p.title === result.title.toLowerCase())
if (podcast) {
result.alreadyInLibrary = true
+ result.existentId = podcast.id
}
}
this.results = results
@@ -163,12 +164,16 @@ export default {
},
async selectPodcast(podcast) {
console.log('Selected podcast', podcast)
+ if(podcast.existentId){
+ this.$router.push(`/item/${podcast.existentId}`)
+ return
+ }
if (!podcast.feedUrl) {
this.$toast.error('Invalid podcast - no feed')
return
}
this.processing = true
- var payload = await this.$axios.$post(`/api/podcasts/feed`, { rssFeed: podcast.feedUrl }).catch((error) => {
+ var payload = await this.$axios.$post(`/api/podcasts/feed`, {rssFeed: podcast.feedUrl}).catch((error) => {
console.error('Failed to get feed', error)
this.$toast.error('Failed to get podcast feed')
return null
@@ -191,7 +196,8 @@ export default {
this.existentPodcasts = podcasts.results.map((p) => {
return {
title: p.media.metadata.title.toLowerCase(),
- itunesId: p.media.metadata.itunesId
+ itunesId: p.media.metadata.itunesId,
+ id: p.id
}
})
this.processing = false
diff --git a/server/objects/FeedMeta.js b/server/objects/FeedMeta.js
index ed027972..908d64fa 100644
--- a/server/objects/FeedMeta.js
+++ b/server/objects/FeedMeta.js
@@ -94,8 +94,8 @@ class FeedMeta {
]
},
{ 'itunes:explicit': !!this.explicit },
- { 'itunes:block': !!this.preventIndexing },
- { 'googleplay:block': !!this.preventIndexing }
+ { 'itunes:block': this.preventIndexing?"Yes":"No" },
+ { 'googleplay:block': this.preventIndexing?"yes":"no" }
]
}
}
diff --git a/server/utils/htmlSanitizer.js b/server/utils/htmlSanitizer.js
index e9473d30..68d92c85 100644
--- a/server/utils/htmlSanitizer.js
+++ b/server/utils/htmlSanitizer.js
@@ -1,10 +1,10 @@
const sanitizeHtml = require('../libs/sanitizeHtml')
-const {entities} = require("./htmlEntities");
+const { entities } = require("./htmlEntities");
function sanitize(html) {
const sanitizerOptions = {
allowedTags: [
- 'p', 'ol', 'ul', 'li', 'a', 'strong', 'em', 'del'
+ 'p', 'ol', 'ul', 'li', 'a', 'strong', 'em', 'del', 'br'
],
disallowedTagsMode: 'discard',
allowedAttributes: {
diff --git a/server/utils/libraryHelpers.js b/server/utils/libraryHelpers.js
index 5bbee2af..47a7b9f5 100644
--- a/server/utils/libraryHelpers.js
+++ b/server/utils/libraryHelpers.js
@@ -95,17 +95,20 @@ module.exports = {
checkSeriesProgressFilter(series, filterBy, user) {
const filter = this.decode(filterBy.split('.')[1])
- var numBooksStartedOrFinished = 0
+ let someBookHasProgress = false
+ let someBookIsUnfinished = false
for (const libraryItem of series.books) {
const itemProgress = user.getMediaProgress(libraryItem.id)
- if (filter === 'Finished' && (!itemProgress || !itemProgress.isFinished)) return false
- if (filter === 'Not Started' && itemProgress) return false
- if (itemProgress) numBooksStartedOrFinished++
+ if (!itemProgress || !itemProgress.isFinished) someBookIsUnfinished = true
+ if (itemProgress && itemProgress.progress > 0) someBookHasProgress = true
+
+ if (filter === 'finished' && (!itemProgress || !itemProgress.isFinished)) return false
+ if (filter === 'not-started' && itemProgress) return false
}
- if (numBooksStartedOrFinished === series.books.length) { // Completely finished series
- if (filter === 'Not Finished') return false
- } else if (numBooksStartedOrFinished === 0 && filter === 'In Progress') { // Series not started
+ if (!someBookIsUnfinished && filter === 'not-finished') { // Completely finished series
+ return false
+ } else if (!someBookHasProgress && filter === 'in-progress') { // Series not started
return false
}
return true