diff --git a/client/assets/app.css b/client/assets/app.css
index 6ec19ed5..90371142 100644
--- a/client/assets/app.css
+++ b/client/assets/app.css
@@ -187,3 +187,15 @@ Bookshelf Label
opacity: 1;
filter: blur(20px);
}
+
+
+.episode-subtitle {
+ word-break: break-word;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ line-height: 16px; /* fallback */
+ max-height: 32px; /* fallback */
+ -webkit-line-clamp: 2; /* number of lines to show */
+ -webkit-box-orient: vertical;
+}
\ No newline at end of file
diff --git a/client/components/modals/podcast/NewModal.vue b/client/components/modals/podcast/NewModal.vue
index 820ce875..75ebf0e7 100644
--- a/client/components/modals/podcast/NewModal.vue
+++ b/client/components/modals/podcast/NewModal.vue
@@ -34,9 +34,6 @@
Episodes
+
+ No Episodes
+
diff --git a/client/components/widgets/PodcastDetailsEdit.vue b/client/components/widgets/PodcastDetailsEdit.vue
index adb71a7a..5010ca39 100644
--- a/client/components/widgets/PodcastDetailsEdit.vue
+++ b/client/components/widgets/PodcastDetailsEdit.vue
@@ -40,6 +40,10 @@
+
+
+
+
@@ -193,6 +197,11 @@ export default {
if (!this.stringArrayEqual(this.newTags, this.media.tags || [])) {
updatePayload.tags = [...this.newTags]
}
+
+ if (this.media.autoDownloadEpisodes !== this.autoDownloadEpisodes) {
+ updatePayload.autoDownloadEpisodes = !!this.autoDownloadEpisodes
+ }
+
return {
updatePayload,
hasChanges: !!Object.keys(updatePayload).length
diff --git a/client/pages/item/_id/index.vue b/client/pages/item/_id/index.vue
index e35802d8..1772e2ca 100644
--- a/client/pages/item/_id/index.vue
+++ b/client/pages/item/_id/index.vue
@@ -110,7 +110,7 @@
play_arrow
- {{ streaming ? 'Streaming' : 'Play' }}
+ {{ streaming ? 'Playing' : 'Play' }}
error
diff --git a/server/controllers/PodcastController.js b/server/controllers/PodcastController.js
index 5d08bd99..c8564fa3 100644
--- a/server/controllers/PodcastController.js
+++ b/server/controllers/PodcastController.js
@@ -62,6 +62,7 @@ class PodcastController {
// Download and save cover image
if (payload.media.metadata.imageUrl) {
+ // TODO: Scan cover image to library files
var coverResponse = await this.coverManager.downloadCoverFromUrl(libraryItem, payload.media.metadata.imageUrl)
if (coverResponse) {
if (coverResponse.error) {
diff --git a/server/managers/PodcastManager.js b/server/managers/PodcastManager.js
index 60fad0d9..0deda722 100644
--- a/server/managers/PodcastManager.js
+++ b/server/managers/PodcastManager.js
@@ -84,9 +84,11 @@ class PodcastManager {
Logger.error(`[PodcastManager] Podcast Episode finished but library item was not found ${this.currentDownload.libraryItem.id}`)
return false
}
+
var podcastEpisode = this.currentDownload.podcastEpisode
podcastEpisode.audioFile = audioFile
libraryItem.media.addPodcastEpisode(podcastEpisode)
+ libraryItem.libraryFiles.push(libraryFile)
libraryItem.updatedAt = Date.now()
await this.db.updateLibraryItem(libraryItem)
this.emitter('item_updated', libraryItem.toJSONExpanded())
diff --git a/server/objects/PodcastEpisodeDownload.js b/server/objects/PodcastEpisodeDownload.js
index 74f3f9ee..44c407d6 100644
--- a/server/objects/PodcastEpisodeDownload.js
+++ b/server/objects/PodcastEpisodeDownload.js
@@ -24,7 +24,7 @@ class PodcastEpisodeDownload {
}
get targetRelPath() {
- return Path.join(this.libraryItem.relPath, this.targetFilename)
+ return this.targetFilename
}
setData(podcastEpisode, libraryItem) {
diff --git a/server/objects/files/AudioTrack.js b/server/objects/files/AudioTrack.js
index 52711b64..5e4b03be 100644
--- a/server/objects/files/AudioTrack.js
+++ b/server/objects/files/AudioTrack.js
@@ -1,5 +1,5 @@
const Path = require('path')
-
+const { encodeUriPath } = require('../../utils/index')
class AudioTrack {
constructor() {
this.index = null
@@ -26,7 +26,7 @@ class AudioTrack {
this.startOffset = startOffset
this.duration = audioFile.duration
this.title = audioFile.metadata.filename || ''
- this.contentUrl = Path.join(`/s/item/${itemId}`, audioFile.metadata.relPath)
+ this.contentUrl = Path.join(`/s/item/${itemId}`, encodeUriPath(audioFile.metadata.relPath))
this.mimeType = audioFile.mimeType
}
diff --git a/server/objects/mediaTypes/Podcast.js b/server/objects/mediaTypes/Podcast.js
index 9654fe64..09b9954f 100644
--- a/server/objects/mediaTypes/Podcast.js
+++ b/server/objects/mediaTypes/Podcast.js
@@ -1,3 +1,4 @@
+const Logger = require('../../Logger')
const PodcastEpisode = require('../entities/PodcastEpisode')
const PodcastMetadata = require('../metadata/PodcastMetadata')
const { areEquivalent, copyValue } = require('../../utils/index')
diff --git a/server/routers/StaticRouter.js b/server/routers/StaticRouter.js
index b571869f..0b628831 100644
--- a/server/routers/StaticRouter.js
+++ b/server/routers/StaticRouter.js
@@ -18,6 +18,7 @@ class StaticRouter {
var remainingPath = req.params['0']
var fullPath = Path.join(item.path, remainingPath)
+ console.log('fullpath', fullPath)
res.sendFile(fullPath)
})
}
diff --git a/server/utils/index.js b/server/utils/index.js
index d13c7573..2f1ac3d1 100644
--- a/server/utils/index.js
+++ b/server/utils/index.js
@@ -117,4 +117,8 @@ module.exports.copyValue = (val) => {
}
return final
}
+}
+
+module.exports.encodeUriPath = (path) => {
+ return path.replace(/\\/g, '/').replace(/%/g, '%25').replace(/#/g, '%23')
}
\ No newline at end of file