From 04519388ce1bf3acc9997b35748762a7380e5954 Mon Sep 17 00:00:00 2001 From: skiingwiz Date: Sat, 27 Mar 2021 22:15:10 -0400 Subject: Allow directly adding a feed without going through the discovery process Signed-off-by: skiingwiz --- lib/Service/FeedServiceV2.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'lib/Service/FeedServiceV2.php') diff --git a/lib/Service/FeedServiceV2.php b/lib/Service/FeedServiceV2.php index d15dfceb7..bb1be8dcb 100644 --- a/lib/Service/FeedServiceV2.php +++ b/lib/Service/FeedServiceV2.php @@ -189,15 +189,18 @@ class FeedServiceV2 extends Service bool $full_text = false, ?string $title = null, ?string $user = null, - ?string $password = null + ?string $password = null, + bool $full_discover = true ): Entity { if ($this->existsForUser($userId, $feedUrl)) { throw new ServiceConflictException('Feed with this URL exists'); } - $feeds = $this->explorer->discover($feedUrl); - if ($feeds !== []) { - $feedUrl = array_shift($feeds); + if ($full_discover) { + $feeds = $this->explorer->discover($feedUrl); + if ($feeds !== []) { + $feedUrl = array_shift($feeds); + } } try { -- cgit v1.2.3