From c25fd7677990d2cb11a23b5ffc0ef7974f522fe2 Mon Sep 17 00:00:00 2001 From: Josh Brickner <15388+leftouterjoins@users.noreply.github.com> Date: Tue, 17 Jun 2025 08:52:36 -0600 Subject: [PATCH 01/12] Add PodcastIndex search feature --- conf/podsumer.conf | 3 ++ conf/test.conf | 3 ++ src/Brickner/Podsumer/PodcastIndex.php | 45 ++++++++++++++++++++ templates/home.html.php | 7 +++ templates/search.html.php | 38 +++++++++++++++++ tests/Brickner/Podsumer/PodcastIndexTest.php | 13 ++++++ www/index.php | 31 ++++++++++++++ 7 files changed, 140 insertions(+) create mode 100644 src/Brickner/Podsumer/PodcastIndex.php create mode 100644 templates/search.html.php create mode 100644 tests/Brickner/Podsumer/PodcastIndexTest.php diff --git a/conf/podsumer.conf b/conf/podsumer.conf index cfca4e1..6e7730f 100755 --- a/conf/podsumer.conf +++ b/conf/podsumer.conf @@ -33,3 +33,6 @@ media_dir = /opt/media playback_interval = 5 playback_rewind = 5 +podcastindex_key = "" +podcastindex_secret = "" + diff --git a/conf/test.conf b/conf/test.conf index f520714..39249a8 100644 --- a/conf/test.conf +++ b/conf/test.conf @@ -14,3 +14,6 @@ ssl = false media_dir = /opt/media playback_interval = 5 playback_rewind = 5 + +podcastindex_key = "" +podcastindex_secret = "" diff --git a/src/Brickner/Podsumer/PodcastIndex.php b/src/Brickner/Podsumer/PodcastIndex.php new file mode 100644 index 0000000..0d34eda --- /dev/null +++ b/src/Brickner/Podsumer/PodcastIndex.php @@ -0,0 +1,45 @@ + + +
diff --git a/templates/search.html.php b/templates/search.html.php new file mode 100644 index 0000000..1252068 --- /dev/null +++ b/templates/search.html.php @@ -0,0 +1,38 @@ +No Results
+ } ?> + + foreach ($feeds as $feed): ?> ++ Subscribe +
+= substr($feed['description'] ?? '', 0, 360) ?>
+- Subscribe -
-= substr($feed['description'] ?? '', 0, 360) ?>
+= htmlspecialchars(substr($feed['description'] ?? '', 0, 360), ENT_QUOTES) ?>
-
Thank You for Listening With Podsumer
@@ -30,12 +43,68 @@
or contributing to
further development.
-
Released under the MIT License – Database version: = $this->main->getState()->getVersion(); ?>