diff --git a/client/components/modals/podcast/RemoveEpisode.vue b/client/components/modals/podcast/RemoveEpisode.vue index 0222528e3..b2cebe84e 100644 --- a/client/components/modals/podcast/RemoveEpisode.vue +++ b/client/components/modals/podcast/RemoveEpisode.vue @@ -94,6 +94,7 @@ export default { } this.processing = false + this.$toast.success(`${this.episodes.length} episode${this.episodes.length > 1 ? 's' : ''} removed`) this.show = false this.$emit('clearSelected') } diff --git a/client/components/modals/podcast/tabs/EpisodeMatch.vue b/client/components/modals/podcast/tabs/EpisodeMatch.vue index c7ac60cd3..dbea4e70b 100644 --- a/client/components/modals/podcast/tabs/EpisodeMatch.vue +++ b/client/components/modals/podcast/tabs/EpisodeMatch.vue @@ -114,7 +114,7 @@ export default { .$patch(`/api/podcasts/${this.libraryItem.id}/episode/${this.episodeId}`, updatePayload) .then(() => { this.isProcessing = false - this.$toast.success(this.$strings.ToastPodcastEpisodeUpdated) + this.$toast.success('Podcast episode updated') this.$emit('selectTab', 'details') }) .catch((error) => { diff --git a/client/strings/en-us.json b/client/strings/en-us.json index 77e9e07a6..5885445b8 100644 --- a/client/strings/en-us.json +++ b/client/strings/en-us.json @@ -1096,7 +1096,6 @@ "ToastPlaylistUpdateSuccess": "Playlist updated", "ToastPodcastCreateFailed": "Failed to create podcast", "ToastPodcastCreateSuccess": "Podcast created successfully", - "ToastPodcastEpisodeUpdated": "Episode updated", "ToastPodcastGetFeedFailed": "Failed to get podcast feed", "ToastPodcastNoEpisodesInFeed": "No episodes found in RSS feed", "ToastPodcastNoRssFeed": "Podcast does not have an RSS feed", diff --git a/server/objects/Stream.js b/server/objects/Stream.js index d9bdd583c..813ecf146 100644 --- a/server/objects/Stream.js +++ b/server/objects/Stream.js @@ -146,7 +146,7 @@ class Stream extends EventEmitter { async generatePlaylist() { await fs.ensureDir(this.streamPath) - await hlsPlaylistGenerator(this.playlistPath, 'output', this.totalDuration, this.segmentLength, this.hlsSegmentType) + await hlsPlaylistGenerator(this.playlistPath, 'output', this.totalDuration, this.segmentLength, this.hlsSegmentType, this.userToken) return this.clientPlaylistUri } diff --git a/server/utils/ffmpegHelpers.js b/server/utils/ffmpegHelpers.js index 0c4da5f95..357a20845 100644 --- a/server/utils/ffmpegHelpers.js +++ b/server/utils/ffmpegHelpers.js @@ -118,7 +118,6 @@ module.exports.downloadPodcastEpisode = (podcastEpisodeDownload) => { method: 'GET', responseType: 'stream', headers: { - 'Accept': '*/*', 'User-Agent': userAgent }, timeout: global.PodcastDownloadTimeout diff --git a/server/utils/generators/hlsPlaylistGenerator.js b/server/utils/generators/hlsPlaylistGenerator.js index 369c1456d..58c1d69ae 100644 --- a/server/utils/generators/hlsPlaylistGenerator.js +++ b/server/utils/generators/hlsPlaylistGenerator.js @@ -1,6 +1,6 @@ const fs = require('../../libs/fsExtra') -function getPlaylistStr(segmentName, duration, segmentLength, hlsSegmentType) { +function getPlaylistStr(segmentName, duration, segmentLength, hlsSegmentType, token) { var ext = hlsSegmentType === 'fmp4' ? 'm4s' : 'ts' var lines = [ @@ -18,18 +18,18 @@ function getPlaylistStr(segmentName, duration, segmentLength, hlsSegmentType) { var lastSegment = duration - (numSegments * segmentLength) for (let i = 0; i < numSegments; i++) { lines.push(`#EXTINF:6,`) - lines.push(`${segmentName}-${i}.${ext}`) + lines.push(`${segmentName}-${i}.${ext}?token=${token}`) } if (lastSegment > 0) { lines.push(`#EXTINF:${lastSegment},`) - lines.push(`${segmentName}-${numSegments}.${ext}`) + lines.push(`${segmentName}-${numSegments}.${ext}?token=${token}`) } lines.push('#EXT-X-ENDLIST') return lines.join('\n') } -function generatePlaylist(outputPath, segmentName, duration, segmentLength, hlsSegmentType) { - var playlistStr = getPlaylistStr(segmentName, duration, segmentLength, hlsSegmentType) +function generatePlaylist(outputPath, segmentName, duration, segmentLength, hlsSegmentType, token) { + var playlistStr = getPlaylistStr(segmentName, duration, segmentLength, hlsSegmentType, token) return fs.writeFile(outputPath, playlistStr) } module.exports = generatePlaylist \ No newline at end of file