aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2021-01-27 17:15:21 +0100
committerChocobozzz <chocobozzz@cpy.re>2021-01-28 15:55:34 +0100
commitba5d4a849c7d7ba05f093480ae12286c4af61556 (patch)
tree704a80b96d3b437ad12feacaaaf58a96b97282a1 /shared
parent3da68f0a781ebd893521e2e6fa200280c92ae815 (diff)
downloadPeerTube-ba5d4a849c7d7ba05f093480ae12286c4af61556.tar.gz
PeerTube-ba5d4a849c7d7ba05f093480ae12286c4af61556.tar.zst
PeerTube-ba5d4a849c7d7ba05f093480ae12286c4af61556.zip
move from trending routes to alg param
Diffstat (limited to 'shared')
-rw-r--r--shared/extra-utils/server/config.ts14
-rw-r--r--shared/models/server/custom-config.model.ts15
-rw-r--r--shared/models/server/server-config.model.ts10
3 files changed, 21 insertions, 18 deletions
diff --git a/shared/extra-utils/server/config.ts b/shared/extra-utils/server/config.ts
index 5152ec693..4e09e0412 100644
--- a/shared/extra-utils/server/config.ts
+++ b/shared/extra-utils/server/config.ts
@@ -69,12 +69,6 @@ function updateCustomSubConfig (url: string, token: string, newConfig: DeepParti
69 defaultNSFWPolicy: 'blur', 69 defaultNSFWPolicy: 'blur',
70 70
71 defaultClientRoute: '/videos/recently-added', 71 defaultClientRoute: '/videos/recently-added',
72 defaultTrendingRoute: '/videos/trending',
73 pages: {
74 hot: {
75 enabled: true
76 }
77 },
78 72
79 customizations: { 73 customizations: {
80 javascript: 'alert("coucou")', 74 javascript: 'alert("coucou")',
@@ -165,6 +159,14 @@ function updateCustomSubConfig (url: string, token: string, newConfig: DeepParti
165 } 159 }
166 } 160 }
167 }, 161 },
162 trending: {
163 videos: {
164 algorithms: {
165 enabled: [ 'hot', 'most-viewed', 'most-liked' ],
166 default: 'hot'
167 }
168 }
169 },
168 autoBlacklist: { 170 autoBlacklist: {
169 videos: { 171 videos: {
170 ofUsers: { 172 ofUsers: {
diff --git a/shared/models/server/custom-config.model.ts b/shared/models/server/custom-config.model.ts
index fcc29e5d7..a57237414 100644
--- a/shared/models/server/custom-config.model.ts
+++ b/shared/models/server/custom-config.model.ts
@@ -33,12 +33,6 @@ export interface CustomConfig {
33 defaultNSFWPolicy: NSFWPolicyType 33 defaultNSFWPolicy: NSFWPolicyType
34 34
35 defaultClientRoute: string 35 defaultClientRoute: string
36 defaultTrendingRoute: string
37 pages: {
38 hot: {
39 enabled: boolean
40 }
41 }
42 36
43 customizations: { 37 customizations: {
44 javascript?: string 38 javascript?: string
@@ -131,6 +125,15 @@ export interface CustomConfig {
131 } 125 }
132 } 126 }
133 127
128 trending: {
129 videos: {
130 algorithms: {
131 enabled: string[]
132 default: string
133 }
134 }
135 }
136
134 autoBlacklist: { 137 autoBlacklist: {
135 videos: { 138 videos: {
136 ofUsers: { 139 ofUsers: {
diff --git a/shared/models/server/server-config.model.ts b/shared/models/server/server-config.model.ts
index a2d93ce73..47d0e623b 100644
--- a/shared/models/server/server-config.model.ts
+++ b/shared/models/server/server-config.model.ts
@@ -39,12 +39,6 @@ export interface ServerConfig {
39 isNSFW: boolean 39 isNSFW: boolean
40 defaultNSFWPolicy: NSFWPolicyType 40 defaultNSFWPolicy: NSFWPolicyType
41 defaultClientRoute: string 41 defaultClientRoute: string
42 defaultTrendingRoute: string
43 pages: {
44 hot: {
45 enabled: boolean
46 }
47 }
48 customizations: { 42 customizations: {
49 javascript: string 43 javascript: string
50 css: string 44 css: string
@@ -180,6 +174,10 @@ export interface ServerConfig {
180 trending: { 174 trending: {
181 videos: { 175 videos: {
182 intervalDays: number 176 intervalDays: number
177 algorithms: {
178 enabled: string[]
179 default: string
180 }
183 } 181 }
184 } 182 }
185 183