Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix(web): exclude sub-folder videos from public space root

Richie McIlroydd2afeba2300
diff --git a/apps/web/lib/public-collections.ts b/apps/web/lib/public-collections.ts
index 263f2bb0c..e44e5b8bb 100644
--- a/apps/web/lib/public-collections.ts
+++ b/apps/web/lib/public-collections.ts
@@ -474,6 +474,7 @@ async function getPublicSpaceVideos(
const offset = (page - 1) * PUBLIC_COLLECTION_PAGE_SIZE;
const where = and(
eq(spaceVideos.spaceId, collection.id as Space.SpaceIdOrOrganisationId),
+ isNull(spaceVideos.folderId),
eq(videos.public, true),
isNull(organizations.tombstoneAt),
videoPasswordPredicate(