This commit is contained in:
Kieran Eglin
2024-04-22 09:08:51 -07:00
parent 98c2812ee8
commit ebf5d6afb5
4 changed files with 53 additions and 0 deletions
@@ -25,6 +25,16 @@ defmodule PinchflatWeb.Sources.SourceHTML do
]
end
def source_image_mapping(source) do
image_mapping = [
{"Poster", source.poster_filepath, "poster"},
{"Banner", source.banner_filepath, "banner"},
{"Fanart", source.fanart_filepath, "fanart"}
]
Enum.filter(image_mapping, fn {_, filepath, _} -> filepath end)
end
def rss_feed_url(conn, source) do
url(conn, ~p"/sources/#{source.uuid}/feed") <> ".xml"
end