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/tests/api/videos/video-playlists.ts | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'server/tests') diff --git a/server/tests/api/videos/video-playlists.ts b/server/tests/api/videos/video-playlists.ts index 6a18cf26a..e8e653382 100644 --- a/server/tests/api/videos/video-playlists.ts +++ b/server/tests/api/videos/video-playlists.ts @@ -3,6 +3,7 @@ import { expect } from 'chai' import { checkPlaylistFilesWereRemoved, testImage } from '@server/tests/shared' import { wait } from '@shared/core-utils' +import { uuidToShort } from '@shared/extra-utils' import { HttpStatusCode, VideoPlaylist, @@ -23,7 +24,6 @@ import { setDefaultVideoChannel, waitJobs } from '@shared/server-commands' -import { uuidToShort } from '@shared/extra-utils' async function checkPlaylistElementType ( servers: PeerTubeServer[], @@ -752,19 +752,6 @@ describe('Test video playlists', function () { await checkPlaylistElementType(group2, playlistServer1UUID2, VideoPlaylistElementType.REGULAR, position, name, 3) } }) - - it('Should hide the video if it is NSFW', async function () { - const body = await commands[0].listVideos({ token: userTokenServer1, playlistId: playlistServer1UUID2, query: { nsfw: 'false' } }) - expect(body.total).to.equal(3) - - const elements = body.data - const element = elements.find(e => e.position === 3) - - expect(element).to.exist - expect(element.video).to.be.null - expect(element.type).to.equal(VideoPlaylistElementType.UNAVAILABLE) - }) - }) describe('Managing playlist elements', function () { -- cgit v1.2.3