Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update autoplay next recommended/playlist video setting to be "by default" #6400

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading