X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fcontrollers%2Fbots.ts;h=2a8d6863a08672bc116a82773e262020ea7820a2;hb=650580504cf14a87bd4025eec9673eb5642dc71d;hp=de04116086ee2fb6257713f3360ffacf5cec0e9e;hpb=421ff4618da64f0849353383f690a014024c40da;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/controllers/bots.ts b/server/controllers/bots.ts index de0411608..2a8d6863a 100644 --- a/server/controllers/bots.ts +++ b/server/controllers/bots.ts @@ -1,4 +1,5 @@ -import * as express from 'express' +import { getServerActor } from '@server/models/application/application' +import express from 'express' import { truncate } from 'lodash' import { SitemapStream, streamToPromise } from 'sitemap' import { buildNSFWFilter } from '../helpers/express-utils' @@ -63,14 +64,18 @@ async function getSitemapAccountUrls () { } async function getSitemapLocalVideoUrls () { + const serverActor = await getServerActor() + const { data } = await VideoModel.listForApi({ start: 0, count: undefined, sort: 'createdAt', - includeLocalVideos: true, + displayOnlyForFollower: { + actorId: serverActor.id, + orLocalVideos: true + }, + isLocal: true, nsfw: buildNSFWFilter(), - filter: 'local', - withFiles: false, countVideos: false })