X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=server%2Fcontrollers%2Fbots.ts;h=2a8d6863a08672bc116a82773e262020ea7820a2;hb=c55e3d7227fe1453869e309025996b9d75256d5d;hp=63db345bfe0ce0c866fa0d07a7bf366e6a6aa7c4;hpb=41fb13c330de629df2d23379209e79c7af0f2e9a;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/controllers/bots.ts b/server/controllers/bots.ts index 63db345bf..2a8d6863a 100644 --- a/server/controllers/bots.ts +++ b/server/controllers/bots.ts @@ -1,3 +1,4 @@ +import { getServerActor } from '@server/models/application/application' import express from 'express' import { truncate } from 'lodash' import { SitemapStream, streamToPromise } from 'sitemap' @@ -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 })