aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/custom-validators
diff options
context:
space:
mode:
authorLoveIsGrief <LoveIsGrief@users.noreply.github.com>2019-09-24 08:48:01 +0200
committerChocobozzz <me@florianbigard.com>2019-09-24 08:48:01 +0200
commit6aa541481390980f9c85d2e66514ba0e6ce77a35 (patch)
tree7b2e934647a732645c69e5d05e4b18152b50a6b8 /server/helpers/custom-validators
parent32d7f2b754b8d20bf44ae2121c79570cbff973c3 (diff)
downloadPeerTube-6aa541481390980f9c85d2e66514ba0e6ce77a35.tar.gz
PeerTube-6aa541481390980f9c85d2e66514ba0e6ce77a35.tar.zst
PeerTube-6aa541481390980f9c85d2e66514ba0e6ce77a35.zip
Autoplay next recommended video (#2137)
* Start working on autoplay of next video * Ignore changes made by gitpod * Apply changes from PR#1370 * Correct the spelling of recommendations * Fix linting errors * Move boolean check to existing onEnded handler * Pick a random video until the recommendations are improved * Add simple tests for autoPlayNextVideo * Fix lint ...again
Diffstat (limited to 'server/helpers/custom-validators')
-rw-r--r--server/helpers/custom-validators/users.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/server/helpers/custom-validators/users.ts b/server/helpers/custom-validators/users.ts
index 68e84d9eb..16a95f120 100644
--- a/server/helpers/custom-validators/users.ts
+++ b/server/helpers/custom-validators/users.ts
@@ -65,6 +65,10 @@ function isUserBlockedValid (value: any) {
65 return isBooleanValid(value) 65 return isBooleanValid(value)
66} 66}
67 67
68function isUserAutoPlayNextVideoValid (value: any) {
69 return isBooleanValid(value)
70}
71
68function isNoInstanceConfigWarningModal (value: any) { 72function isNoInstanceConfigWarningModal (value: any) {
69 return isBooleanValid(value) 73 return isBooleanValid(value)
70} 74}
@@ -106,6 +110,7 @@ export {
106 isUserNSFWPolicyValid, 110 isUserNSFWPolicyValid,
107 isUserWebTorrentEnabledValid, 111 isUserWebTorrentEnabledValid,
108 isUserAutoPlayVideoValid, 112 isUserAutoPlayVideoValid,
113 isUserAutoPlayNextVideoValid,
109 isUserDisplayNameValid, 114 isUserDisplayNameValid,
110 isUserDescriptionValid, 115 isUserDescriptionValid,
111 isNoInstanceConfigWarningModal, 116 isNoInstanceConfigWarningModal,