From 881aca29c55e0534d6f6853365d7adeb9cb808da Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Tue, 6 Jun 2023 09:21:16 -0700 Subject: [PATCH] chore: remove duplicate filters + unnecessary url transform --- config/mediaFilters.js | 5 +---- src/_includes/now.liquid | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/config/mediaFilters.js b/config/mediaFilters.js index d21cc164..c1099f9c 100644 --- a/config/mediaFilters.js +++ b/config/mediaFilters.js @@ -12,10 +12,7 @@ module.exports = { : `https://cdn.coryd.dev/albums/${media.name.replace(/\s+/g, '-').toLowerCase()}.jpg` }, tv: (episode) => `https://cdn.coryd.dev/tv/${episode.replace(/\s+/g, '-').toLowerCase()}.jpg`, - movie: (url, host, cdn) => { - return url.replace(host, cdn).replace('600', '200').replace('900', '300') - }, - book: (url, host, cdn) => { + cdn: (url, host, cdn) => { return url.replace(host, cdn) }, } diff --git a/src/_includes/now.liquid b/src/_includes/now.liquid index eb023c57..74f24250 100644 --- a/src/_includes/now.liquid +++ b/src/_includes/now.liquid @@ -102,7 +102,7 @@ layout: main
{{ book.title }}
- {%- capture bookImg %}{{book.image | book: site.oku-host, site.cdn-books}}{% endcapture -%} + {%- capture bookImg %}{{book.image | cdn: site.oku-host, site.cdn-books}}{% endcapture -%} {%- capture bookName %}{{book.title | escape}}{% endcapture -%} {% image bookImg, bookName, 'rounded-lg w-full', '180px' %} @@ -140,7 +140,7 @@ layout: main
{{ movie.title }}
- {%- capture movieImg %}{{movie.image | movie: site.letterboxd-host, site.cdn-movies}}{% endcapture -%} + {%- capture movieImg %}{{movie.image | cdn: site.letterboxd-host, site.cdn-movies}}{% endcapture -%} {%- capture movieName %}{{movie.title | escape}}{% endcapture -%} {% image movieImg, movieName, 'rounded-lg w-full', '180px' %}