From b5f0f22fa7f64f38d4202b25a2a43977e45939d6 Mon Sep 17 00:00:00 2001 From: Alex Cabal Date: Fri, 13 Dec 2024 12:11:27 -0600 Subject: [PATCH] Don't show works on the wanted list as not PD yet --- lib/EbookPlaceholder.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/EbookPlaceholder.php b/lib/EbookPlaceholder.php index 653bac5d..300eab77 100644 --- a/lib/EbookPlaceholder.php +++ b/lib/EbookPlaceholder.php @@ -20,7 +20,13 @@ class EbookPlaceholder{ protected function GetIsPublicDomain(): bool{ if(!isset($this->_IsPublicDomain)){ - $this->_IsPublicDomain = $this->YearPublished === null ? true : $this->YearPublished <= PD_YEAR; + if($this->IsWanted){ + // If this book is on our wanted list, we can assume it's already PD. Otherwise works like pulp sci fi, etc., that did not renew would be shown as "not PD yet". + $this->_IsPublicDomain = true; + } + else{ + $this->_IsPublicDomain = $this->YearPublished === null ? true : $this->YearPublished <= PD_YEAR; + } } return $this->_IsPublicDomain;