diff --git a/src/renderer/App.js b/src/renderer/App.js index 0d58afbf..1488536e 100644 --- a/src/renderer/App.js +++ b/src/renderer/App.js @@ -399,7 +399,8 @@ export default Vue.extend({ 'grabHistory', 'grabAllPlaylists', 'getRegionData', - 'getYoutubeUrlInfo' + 'getYoutubeUrlInfo', + 'getLocale' ]), ...mapMutations([ diff --git a/src/renderer/components/ft-share-button/ft-share-button.js b/src/renderer/components/ft-share-button/ft-share-button.js index f2745597..4f4d35f9 100644 --- a/src/renderer/components/ft-share-button/ft-share-button.js +++ b/src/renderer/components/ft-share-button/ft-share-button.js @@ -19,6 +19,10 @@ export default Vue.extend({ type: String, required: true }, + playlistId: { + type: String, + required: true + }, getTimestamp: { type: Function, required: true @@ -35,7 +39,13 @@ export default Vue.extend({ }, invidiousURL() { - return `${this.invidiousInstance}/watch?v=${this.id}` + let videoUrl = `${this.invidiousInstance}/watch?v=${this.id}` + // `playlistId` can be undefined + if (this.playlistId && this.playlistId.length !== 0) { + // `index` seems can be ignored + videoUrl += `&list=${this.playlistId}` + } + return videoUrl }, invidiousEmbedURL() { @@ -43,10 +53,21 @@ export default Vue.extend({ }, youtubeURL() { - return `https://www.youtube.com/watch?v=${this.id}` + let videoUrl = `https://www.youtube.com/watch?v=${this.id}` + // `playlistId` can be undefined + if (this.playlistId && this.playlistId.length !== 0) { + // `index` seems can be ignored + videoUrl += `&list=${this.playlistId}` + } + return videoUrl }, youtubeShareURL() { + // `playlistId` can be undefined + if (this.playlistId && this.playlistId.length !== 0) { + // `index` seems can be ignored + return `https://www.youtube.com/watch?v=${this.id}&list=${this.playlistId}` + } return `https://youtu.be/${this.id}` }, @@ -111,7 +132,7 @@ export default Vue.extend({ this.$refs.iconButton.focusOut() }, - updateincludeTimestamp() { + updateIncludeTimestamp() { this.includeTimestamp = !this.includeTimestamp }, diff --git a/src/renderer/components/ft-share-button/ft-share-button.vue b/src/renderer/components/ft-share-button/ft-share-button.vue index c87e5ed2..4f6ce564 100644 --- a/src/renderer/components/ft-share-button/ft-share-button.vue +++ b/src/renderer/components/ft-share-button/ft-share-button.vue @@ -12,7 +12,7 @@ :label="$t('Share.Include Timestamp')" :compact="true" :default-value="includeTimestamp" - @change="updateincludeTimestamp" + @change="updateIncludeTimestamp" />
diff --git a/src/renderer/views/Watch/Watch.vue b/src/renderer/views/Watch/Watch.vue index 449caaae..8424841e 100644 --- a/src/renderer/views/Watch/Watch.vue +++ b/src/renderer/views/Watch/Watch.vue @@ -83,6 +83,7 @@ :is-upcoming="isUpcoming" :download-links="downloadLinks" :watching-playlist="watchingPlaylist" + :playlist-id="playlistId" :theatre-possible="theatrePossible" :length-seconds="videoLengthSeconds" :video-thumbnail="thumbnail"