chore: escape description; add tv to search index

This commit is contained in:
Cory Dransfeldt 2024-10-13 16:18:08 -07:00
parent a90e44ccc9
commit 67de0669db
No known key found for this signature in database
2 changed files with 18 additions and 4 deletions

View file

@ -65,6 +65,20 @@ WITH search_data AS (
g.name AS genre_name,
CONCAT('https://coryd.dev', g.url) AS genre_url
FROM optimized_genres g
UNION ALL
SELECT
CASE
WHEN s.review IS NOT NULL THEN CONCAT('📺 ', s.title, ' (', s.year, ') - ', s.review)
ELSE CONCAT('📺 ', s.title, ' (', s.year, ')')
END AS title,
CONCAT('https://coryd.dev', s.url) AS url,
s.tags,
NULL AS genre_name,
NULL AS genre_url
FROM optimized_shows s
WHERE s.last_watched_at IS NOT NULL
),
search_data_with_id AS (