Skip to content

Commit

Permalink
* Update play next recommended video setting to be "by default" (#6400)
Browse files Browse the repository at this point in the history
  • Loading branch information
PikachuEXE authored Jan 27, 2025
1 parent 34b5179 commit a5585e1
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/renderer/views/Watch/Watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ export default defineComponent({
captions: [],
/** @type {'EQUIRECTANGULAR' | 'EQUIRECTANGULAR_THREED_TOP_BOTTOM' | 'MESH'| null} */
vrProjection: null,
autoplayNextRecommendedVideo: false,
autoplayNextPlaylistVideo: false,
recommendedVideos: [],
downloadLinks: [],
watchingPlaylist: false,
Expand Down Expand Up @@ -182,15 +184,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 () {
Expand Down Expand Up @@ -319,6 +321,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
Expand Down Expand Up @@ -1679,9 +1684,9 @@ export default defineComponent({
}

if (this.watchingPlaylist) {
this.updateAutoplayPlaylists(!this.autoplayEnabled)
this.autoplayNextPlaylistVideo = !this.autoplayEnabled
} else {
this.updatePlayNextVideo(!this.autoplayEnabled)
this.autoplayNextRecommendedVideo = !this.autoplayEnabled
}
},

Expand Down Expand Up @@ -1711,8 +1716,6 @@ export default defineComponent({

...mapActions([
'updateHistory',
'updateAutoplayPlaylists',
'updatePlayNextVideo',
'updateWatchProgress',
'updateLastViewedPlaylist',
'updatePlaylistLastPlayedAt',
Expand Down

0 comments on commit a5585e1

Please sign in to comment.