mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-08-30 18:43:17 +00:00
option to autoplay playlist only
This commit is contained in:
parent
647f4132a6
commit
1376850dbe
@ -212,7 +212,11 @@
|
||||
<input id="chkAutoLoop" v-model="selectedAutoLoop" class="ml-1.5" type="checkbox" @change="onChange($event)" />
|
||||
<br />
|
||||
<label for="chkAutoPlay"><strong v-text="`${$t('actions.auto_play_next_video')}:`" /></label>
|
||||
<input id="chkAutoPlay" v-model="selectedAutoPlay" class="ml-1.5" type="checkbox" @change="onChange($event)" />
|
||||
<select id="chkAutoPlay" v-model="selectedAutoPlay" class="ml-1.5 select" @change="onChange($event)">
|
||||
<option value="0">none</option>
|
||||
<option value="1">playlist only</option>
|
||||
<option value="2">playlist and recommendations</option>
|
||||
</select>
|
||||
|
||||
<hr />
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user