aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/bots.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-10-27 14:37:04 +0200
committerChocobozzz <chocobozzz@cpy.re>2021-10-29 11:48:21 +0200
commit2760b454a761f6af3138b2fb5f34340772ab0d1e (patch)
tree2b3a2d81478f8b432eb54cce4caa5a760c494627 /server/controllers/bots.ts
parente4611b54910d8e7f2b4f8a97ee2d9cc8e1054127 (diff)
downloadPeerTube-2760b454a761f6af3138b2fb5f34340772ab0d1e.tar.gz
PeerTube-2760b454a761f6af3138b2fb5f34340772ab0d1e.tar.zst
PeerTube-2760b454a761f6af3138b2fb5f34340772ab0d1e.zip
Deprecate filter video query
Introduce include and isLocal instead
Diffstat (limited to 'server/controllers/bots.ts')
-rw-r--r--server/controllers/bots.ts10
1 files changed, 8 insertions, 2 deletions
diff --git a/server/controllers/bots.ts b/server/controllers/bots.ts
index 63db345bf..9f03de7e8 100644
--- a/server/controllers/bots.ts
+++ b/server/controllers/bots.ts
@@ -1,3 +1,4 @@
1import { getServerActor } from '@server/models/application/application'
1import express from 'express' 2import express from 'express'
2import { truncate } from 'lodash' 3import { truncate } from 'lodash'
3import { SitemapStream, streamToPromise } from 'sitemap' 4import { SitemapStream, streamToPromise } from 'sitemap'
@@ -63,13 +64,18 @@ async function getSitemapAccountUrls () {
63} 64}
64 65
65async function getSitemapLocalVideoUrls () { 66async function getSitemapLocalVideoUrls () {
67 const serverActor = await getServerActor()
68
66 const { data } = await VideoModel.listForApi({ 69 const { data } = await VideoModel.listForApi({
67 start: 0, 70 start: 0,
68 count: undefined, 71 count: undefined,
69 sort: 'createdAt', 72 sort: 'createdAt',
70 includeLocalVideos: true, 73 displayOnlyForFollower: {
74 actorId: serverActor.id,
75 orLocalVideos: true
76 },
77 isLocal: true,
71 nsfw: buildNSFWFilter(), 78 nsfw: buildNSFWFilter(),
72 filter: 'local',
73 withFiles: false, 79 withFiles: false,
74 countVideos: false 80 countVideos: false
75 }) 81 })