diff --git a/views/media/books.psql b/views/media/books.psql index dd31b47e..f13f97b0 100644 --- a/views/media/books.psql +++ b/views/media/books.psql @@ -96,7 +96,7 @@ SELECT 'subtext', CASE WHEN b.star_rating IS NOT NULL - THEN CONCAT('(', b.star_rating, ')') + THEN b.star_rating ELSE NULL END ) AS grid, diff --git a/views/media/movies.psql b/views/media/movies.psql index 608e8dd4..2132c9f8 100644 --- a/views/media/movies.psql +++ b/views/media/movies.psql @@ -23,8 +23,8 @@ SELECT 'backdrop', CONCAT('/', df2.filename_disk), 'alt', CONCAT(m.title, ' (', m.year, ')'), 'subtext', CASE - WHEN m.star_rating IS NOT NULL THEN CONCAT(m.year, ' (', m.star_rating, ')') - ELSE m.year::TEXT + WHEN m.star_rating IS NOT NULL THEN CONCAT(m.star_rating, ' (', m.year, ')') + ELSE CONCAT('(', m.year, ')') END ) AS grid, @@ -102,7 +102,7 @@ SELECT ) AS related_movies, CASE - WHEN m.star_rating IS NOT NULL AND m.last_watched IS NOT NULL THEN + WHEN m.star_rating IS NOT NULL AND m.last_watched IS NOT NULL THEN json_build_object( 'title', m.title, 'url', CONCAT('https://coryd.dev/movies/', m.slug),