From 2760b454a761f6af3138b2fb5f34340772ab0d1e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 27 Oct 2021 14:37:04 +0200 Subject: Deprecate filter video query Introduce include and isLocal instead --- server/controllers/bots.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'server/controllers/bots.ts') 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 @@ +import { getServerActor } from '@server/models/application/application' import express from 'express' import { truncate } from 'lodash' import { SitemapStream, streamToPromise } from 'sitemap' @@ -63,13 +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 }) -- cgit v1.2.3