Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Video search -> case insensitive

Chocobozzz18c8e945089b
diff --git a/scripts/dev/server.sh b/scripts/dev/server.sh
index bff26cb4bb..3130f1d872 100755
--- a/scripts/dev/server.sh
+++ b/scripts/dev/server.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env sh
-if [ ! -d "./client/dist" ]; then
- echo "client/dist does not exist, compile client files..."
+if [ ! -f "./client/dist/index.html" ]; then
+ echo "client/dist/index.html does not exist, compile client files..."
npm run build:client
fi
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index 629051ae46..3d71e8d9e6 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -730,28 +730,28 @@ searchAndPopulateAuthorAndPodAndTags = function (value: string, field: string, s
`(SELECT "VideoTags"."videoId"
FROM "Tags"
INNER JOIN "VideoTags" ON "Tags"."id" = "VideoTags"."tagId"
- WHERE name LIKE ${escapedValue}
+ WHERE name ILIKE ${escapedValue}
)`
)
} else if (field === 'host') {
// FIXME: Include our pod? (not stored in the database)
podInclude.where = {
host: {
- $like: '%' + value + '%'
+ $iLike: '%' + value + '%'
}
}
podInclude.required = true
} else if (field === 'author') {
authorInclude.where = {
name: {
- $like: '%' + value + '%'
+ $iLike: '%' + value + '%'
}
}
// authorInclude.or = true
} else {
query.where[field] = {
- $like: '%' + value + '%'
+ $iLike: '%' + value + '%'
}
}
@@ -759,10 +759,6 @@ searchAndPopulateAuthorAndPodAndTags = function (value: string, field: string, s
authorInclude, tagInclude
]
- if (tagInclude.where) {
- // query.include.push([ Video['sequelize'].models.Tag ])
- }
-
return Video.findAndCountAll(query).then(({ rows, count }) => {
return {
data: rows,