Skip to content

Commit 400c0ef

Browse files
committed
Merge branch 'feature/play-next-by-default' into custom-builds/tmp
* feature/play-next-by-default: * Update play next recommended video setting to be "by default"
2 parents e8d2624 + 6988caf commit 400c0ef

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/renderer/views/Watch/Watch.js

+10-7
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ export default defineComponent({
111111
captions: [],
112112
/** @type {'EQUIRECTANGULAR' | 'EQUIRECTANGULAR_THREED_TOP_BOTTOM' | 'MESH'| null} */
113113
vrProjection: null,
114+
autoplayNextRecommendedVideo: false,
115+
autoplayNextPlaylistVideo: false,
114116
recommendedVideos: [],
115117
downloadLinks: [],
116118
watchingPlaylist: false,
@@ -179,15 +181,15 @@ export default defineComponent({
179181
return this.$store.getters.getDefaultVideoFormat
180182
},
181183
autoplayEnabled: function () {
182-
return this.watchingPlaylist ? this.autoplayPlaylists : this.playNextVideo
184+
return this.watchingPlaylist ? this.autoplayNextPlaylistVideo : this.autoplayNextRecommendedVideo
183185
},
184186
thumbnailPreference: function () {
185187
return this.$store.getters.getThumbnailPreference
186188
},
187-
playNextVideo: function () {
189+
autoplayNextRecommendedVideoByDefault: function () {
188190
return this.$store.getters.getPlayNextVideo
189191
},
190-
autoplayPlaylists: function () {
192+
autoplayNextPlaylistVideoByDefault: function () {
191193
return this.$store.getters.getAutoplayPlaylists
192194
},
193195
hideRecommendedVideos: function () {
@@ -316,6 +318,9 @@ export default defineComponent({
316318
created: function () {
317319
this.videoId = this.$route.params.id
318320
this.activeFormat = this.defaultVideoFormat
321+
// So that the value for this session remains unchanged even if setting changed
322+
this.autoplayNextRecommendedVideo = this.autoplayNextRecommendedVideoByDefault
323+
this.autoplayNextPlaylistVideo = this.autoplayNextPlaylistVideoByDefault
319324

320325
this.checkIfTimestamp()
321326
this.currentPlaybackRate = this.$store.getters.getDefaultPlayback
@@ -1660,9 +1665,9 @@ export default defineComponent({
16601665
}
16611666

16621667
if (this.watchingPlaylist) {
1663-
this.updateAutoplayPlaylists(!this.autoplayEnabled)
1668+
this.autoplayNextPlaylistVideo = !this.autoplayEnabled
16641669
} else {
1665-
this.updatePlayNextVideo(!this.autoplayEnabled)
1670+
this.autoplayNextRecommendedVideo = !this.autoplayEnabled
16661671
}
16671672
},
16681673

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

16861691
...mapActions([
16871692
'updateHistory',
1688-
'updateAutoplayPlaylists',
1689-
'updatePlayNextVideo',
16901693
'updateWatchProgress',
16911694
'updateLastViewedPlaylist',
16921695
'updatePlaylistLastPlayedAt',

0 commit comments

Comments
 (0)