From 0e661a439fcf747acf09c11abb7a9b3e80a0dec1 Mon Sep 17 00:00:00 2001 From: Kalle Fagerberg Date: Sun, 28 Aug 2022 15:36:00 +0200 Subject: [PATCH] Removed unused namespaces --- lib/Controller/PersonalSettingsController.php | 4 +--- lib/Service/PodcastCacheService.php | 2 +- lib/Settings/GPodderSyncPersonal.php | 2 -- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/Controller/PersonalSettingsController.php b/lib/Controller/PersonalSettingsController.php index e0ae3d6..f5e7690 100644 --- a/lib/Controller/PersonalSettingsController.php +++ b/lib/Controller/PersonalSettingsController.php @@ -12,9 +12,7 @@ use OCA\GPodderSync\Db\SubscriptionChange\SubscriptionChangeRepository; use OCP\AppFramework\Controller; use OCP\AppFramework\Http\JSONResponse; -use OCP\IL10N; use OCP\IRequest; -use OCP\Settings\ISettings; use Psr\Log\LoggerInterface; @@ -85,7 +83,7 @@ class PersonalSettingsController extends Controller { try { $podcast = $this->podcastCacheService->getCachedOrFetchPodcastData($url); $sub['podcast'] = $podcast; - } catch (Exception $e) { + } catch (\Exception $e) { $sub['podcast'] = null; $this->logger->error("Failed to get podcast data.", [ 'exception' => $e, diff --git a/lib/Service/PodcastCacheService.php b/lib/Service/PodcastCacheService.php index a3eceb6..613afc3 100644 --- a/lib/Service/PodcastCacheService.php +++ b/lib/Service/PodcastCacheService.php @@ -52,7 +52,7 @@ class PodcastCacheService { 'author' => self::getXPathContent($xml, '/rss/channel/itunes:author'), 'link' => (string)$channel->link, 'description' => (string)$channel->description, - 'image' => + 'image' => self::getXPathContent($xml, '/rss/channel/image/url') ?? self::getXPathAttribute($xml, '/rss/channel/itunes:image/@href'), 'fetchedAtUnix' => (new DateTime())->getTimestamp(), diff --git a/lib/Settings/GPodderSyncPersonal.php b/lib/Settings/GPodderSyncPersonal.php index 72452aa..cb3f2eb 100644 --- a/lib/Settings/GPodderSyncPersonal.php +++ b/lib/Settings/GPodderSyncPersonal.php @@ -4,8 +4,6 @@ declare(strict_types=1); namespace OCA\GPodderSync\Settings; use OCP\AppFramework\Http\TemplateResponse; -use OCP\IConfig; -use OCP\IL10N; use OCP\Settings\ISettings; class GPodderSyncPersonal implements ISettings {