Skip to content

Commit

Permalink
* Update play next recommended video setting to be "by default"
Browse files Browse the repository at this point in the history
  • Loading branch information
PikachuEXE committed Jan 15, 2025
1 parent d7e2a76 commit 6988caf
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 @@ -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,
Expand Down Expand Up @@ -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 () {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
}
},

Expand All @@ -1685,8 +1690,6 @@ export default defineComponent({

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

0 comments on commit 6988caf

Please sign in to comment.