From a68ccaead667f1b976e0fb10c8b1087af25547f2 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 19 Jan 2023 15:04:10 +0100 Subject: (breaking): Always list nsfw videos in playlists Keep the same behaviour as unlisted videos The frontend is in charge to blur the video element if the nsfw setting is "hide" or "blur" --- server/controllers/api/video-playlist.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'server/controllers/api') diff --git a/server/controllers/api/video-playlist.ts b/server/controllers/api/video-playlist.ts index f8a607170..947f7ca77 100644 --- a/server/controllers/api/video-playlist.ts +++ b/server/controllers/api/video-playlist.ts @@ -15,7 +15,7 @@ import { VideoPlaylistPrivacy } from '../../../shared/models/videos/playlist/vid import { VideoPlaylistReorder } from '../../../shared/models/videos/playlist/video-playlist-reorder.model' import { VideoPlaylistUpdate } from '../../../shared/models/videos/playlist/video-playlist-update.model' import { resetSequelizeInstance } from '../../helpers/database-utils' -import { buildNSFWFilter, createReqFiles } from '../../helpers/express-utils' +import { createReqFiles } from '../../helpers/express-utils' import { logger } from '../../helpers/logger' import { getFormattedObjects } from '../../helpers/utils' import { CONFIG } from '../../initializers/config' @@ -474,10 +474,7 @@ async function getVideoPlaylistVideos (req: express.Request, res: express.Respon 'filter:api.video-playlist.videos.list.result' ) - const options = { - displayNSFW: buildNSFWFilter(res, req.query.nsfw), - accountId: user ? user.Account.id : undefined - } + const options = { accountId: user?.Account?.id } return res.json(getFormattedObjects(resultList.data, resultList.total, options)) } -- cgit v1.2.3