From d49efa08c7d3ec2086b9fcb15835845b820e7530 Mon Sep 17 00:00:00 2001 From: ac615223s5 Date: Tue, 7 Jan 2025 03:48:46 -0800 Subject: [PATCH] feat: option to autoplay playlist only (#3767) --- src/components/WatchVideo.vue | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/components/WatchVideo.vue b/src/components/WatchVideo.vue index 4a09161f..00afd9c0 100644 --- a/src/components/WatchVideo.vue +++ b/src/components/WatchVideo.vue @@ -212,7 +212,11 @@
- +
@@ -424,7 +428,7 @@ export default { }, activated() { this.active = true; - this.selectedAutoPlay = this.getPreferenceBoolean("autoplay", false); + this.selectedAutoPlay = this.getPreferenceNumber("autoplay", 1); this.showComments = !this.getPreferenceBoolean("minimizeComments", false); this.showDesc = !this.getPreferenceBoolean("minimizeDescription", true); this.showRecs = !this.getPreferenceBoolean("minimizeRecommendations", false); @@ -623,8 +627,8 @@ export default { onVideoEnded() { if ( !this.selectedAutoLoop && - this.selectedAutoPlay && - (this.playlist?.relatedStreams?.length > 0 || this.video.relatedStreams.length > 0) + ((this.selectedAutoPlay >= 1 && this.playlist?.relatedStreams?.length > this.index) || + (this.selectedAutoPlay >= 2 && this.video.relatedStreams.length > 0)) ) { this.showToast(); }