From 36db09fb53996f1f43ca096a14fc09d4478112eb Mon Sep 17 00:00:00 2001 From: LJQ Date: Fri, 13 Oct 2023 01:54:42 +0800 Subject: [PATCH 1/2] Fixed year appearing as - in the series page when the years are the same. --- src/components/mediainfo/mediainfo.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/mediainfo/mediainfo.js b/src/components/mediainfo/mediainfo.js index ec908d0d0f..f0f9dd9a76 100644 --- a/src/components/mediainfo/mediainfo.js +++ b/src/components/mediainfo/mediainfo.js @@ -183,9 +183,9 @@ export function getMediaInfoHtml(item, options = {}) { if (item.EndDate) { try { const endYear = datetime.toLocaleString(datetime.parseISO8601Date(item.EndDate).getFullYear(), { useGrouping: false }); - - if (endYear !== item.ProductionYear) { - text += `-${endYear}`; + /* At this point, text will contain only the start year */ + if (endYear !== text) { + text += ` - ${endYear}`; } } catch (e) { console.error('error parsing date:', item.EndDate); From a01bfcef330e6bec0f36f552ddccce08096f9e4c Mon Sep 17 00:00:00 2001 From: LJQ Date: Fri, 13 Oct 2023 12:21:32 +0800 Subject: [PATCH 2/2] Change from 5 tabs to 20 spaces --- src/components/mediainfo/mediainfo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/mediainfo/mediainfo.js b/src/components/mediainfo/mediainfo.js index f0f9dd9a76..a6bfcf7153 100644 --- a/src/components/mediainfo/mediainfo.js +++ b/src/components/mediainfo/mediainfo.js @@ -183,7 +183,7 @@ export function getMediaInfoHtml(item, options = {}) { if (item.EndDate) { try { const endYear = datetime.toLocaleString(datetime.parseISO8601Date(item.EndDate).getFullYear(), { useGrouping: false }); - /* At this point, text will contain only the start year */ + /* At this point, text will contain only the start year */ if (endYear !== text) { text += ` - ${endYear}`; }