diff --git a/src/renderer/views/Watch/Watch.js b/src/renderer/views/Watch/Watch.js index 3f00082828b72..7aaeb72198004 100644 --- a/src/renderer/views/Watch/Watch.js +++ b/src/renderer/views/Watch/Watch.js @@ -111,6 +111,8 @@ export default defineComponent({ captions: [], /** @type {'EQUIRECTANGULAR' | 'EQUIRECTANGULAR_THREED_TOP_BOTTOM' | 'MESH'| null} */ vrProjection: null, + autoplayNextRecommendedVideo: false, + autoplayNextPlaylistVideo: false, recommendedVideos: [], downloadLinks: [], watchingPlaylist: false, @@ -179,15 +181,15 @@ export default defineComponent({ return this.$store.getters.getDefaultVideoFormat }, autoplayEnabled: function () { - return this.watchingPlaylist ? this.autoplayPlaylists : this.playNextVideo + return this.watchingPlaylist ? this.autoplayNextPlaylistVideo : this.autoplayNextRecommendedVideo }, thumbnailPreference: function () { return this.$store.getters.getThumbnailPreference }, - playNextVideo: function () { + autoplayNextRecommendedVideoByDefault: function () { return this.$store.getters.getPlayNextVideo }, - autoplayPlaylists: function () { + autoplayNextPlaylistVideoByDefault: function () { return this.$store.getters.getAutoplayPlaylists }, hideRecommendedVideos: function () { @@ -316,6 +318,9 @@ export default defineComponent({ created: function () { this.videoId = this.$route.params.id this.activeFormat = this.defaultVideoFormat + // So that the value for this session remains unchanged even if setting changed + this.autoplayNextRecommendedVideo = this.autoplayNextRecommendedVideoByDefault + this.autoplayNextPlaylistVideo = this.autoplayNextPlaylistVideoByDefault this.checkIfTimestamp() this.currentPlaybackRate = this.$store.getters.getDefaultPlayback @@ -1660,9 +1665,9 @@ export default defineComponent({ } if (this.watchingPlaylist) { - this.updateAutoplayPlaylists(!this.autoplayEnabled) + this.autoplayNextPlaylistVideo = !this.autoplayEnabled } else { - this.updatePlayNextVideo(!this.autoplayEnabled) + this.autoplayNextRecommendedVideo = !this.autoplayEnabled } }, @@ -1685,8 +1690,6 @@ export default defineComponent({ ...mapActions([ 'updateHistory', - 'updateAutoplayPlaylists', - 'updatePlayNextVideo', 'updateWatchProgress', 'updateLastViewedPlaylist', 'updatePlaylistLastPlayedAt',