diff --git a/lib/pinchflat/settings/setting.ex b/lib/pinchflat/settings/setting.ex
index d449ca0..8e63fc7 100644
--- a/lib/pinchflat/settings/setting.ex
+++ b/lib/pinchflat/settings/setting.ex
@@ -31,6 +31,7 @@ defmodule Pinchflat.Settings.Setting do
field :apprise_version, :string
field :apprise_server, :string
field :youtube_api_key, :string
+ field :route_token, :string
field :video_codec_preference, :string
field :audio_codec_preference, :string
diff --git a/lib/pinchflat_web/controllers/sources/source_html.ex b/lib/pinchflat_web/controllers/sources/source_html.ex
index 4692a04..57a57b4 100644
--- a/lib/pinchflat_web/controllers/sources/source_html.ex
+++ b/lib/pinchflat_web/controllers/sources/source_html.ex
@@ -40,11 +40,13 @@ defmodule PinchflatWeb.Sources.SourceHTML do
end
def rss_feed_url(conn, source) do
+ # NOTE: The reason for this concatenation is to avoid what appears to be a bug in Phoenix
+ # See: https://github.com/phoenixframework/phoenix/issues/6033
url(conn, ~p"/sources/#{source.uuid}/feed") <> ".xml"
end
def opml_feed_url(conn) do
- url(conn, ~p"/sources/opml") <> ".xml"
+ url(conn, ~p"/sources/opml.xml?#{[route_token: Settings.get!(:route_token)]}")
end
def output_path_template_override_placeholders(media_profiles) do
diff --git a/lib/pinchflat_web/controllers/sources/source_html/actions_dropdown.html.heex b/lib/pinchflat_web/controllers/sources/source_html/actions_dropdown.html.heex
index f2681c0..43d0e64 100644
--- a/lib/pinchflat_web/controllers/sources/source_html/actions_dropdown.html.heex
+++ b/lib/pinchflat_web/controllers/sources/source_html/actions_dropdown.html.heex
@@ -1,18 +1,16 @@
<.button_dropdown text="Actions" class="justify-center w-full sm:w-50">
<:option>
- copied = true,
- () => copied = false
- )
- "}
- >
+ <.link href={rss_feed_url(@conn, @source)} x-data="{ copied: false }" x-on:click={~s"
+ $event.preventDefault();
+ copyWithCallbacks(
+ '#{rss_feed_url(@conn, @source)}',
+ () => copied = true,
+ () => copied = false
+ )
+ "}>
Copy RSS Feed
<.icon name="hero-check" class="ml-2 h-4 w-4" />
-
+
<:option>
Sources
-