From 8608dc8151440f109e2a48036fd508fe031d6bbc Mon Sep 17 00:00:00 2001 From: emkael Date: Mon, 25 Nov 2024 23:27:13 +0100 Subject: Ability to filter by title string --- providers/Provider.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/providers/Provider.php b/providers/Provider.php index 7e7dbf0..fe2195c 100644 --- a/providers/Provider.php +++ b/providers/Provider.php @@ -54,6 +54,12 @@ abstract class Provider { } } } + if (array_key_exists('title', $this->_options)) { + $keyword = strtolower($this->_options['title']); + $items = array_filter($items, function($item) use($keyword) { + return str_contains(strtolower($item->Title), $keyword); + }); + } return $items; } -- cgit v1.2.3