* Add media streaming (#108) * [WIP] set up streaming route * Added UUID to sources and media items * Added media preview to MI show page * Added plug to strip file extensions * [VERY WIP] basic podcast RSS setup * [WIP] got basic podcast RSS working * [WIP] more expanding on RSS * Comment * [WIP] Working on refactoring feed * Added UUID backfill to a migration * [WIP] Moar refactoring * [WIP] Adding UI for getting RSS feed * Many tests * Added conditional routing for feed URLs * Removed the need for url_base to be set * Updated preset name * Rendered certain fields HTML-safe; Added logging to confirm range request support * Fixed incorrect scheme issue * Updated env var * Updated other UI to use dropdown * removed commented code * Generate rss feeds (#123) * Added plug to strip file extensions * [VERY WIP] basic podcast RSS setup * [WIP] got basic podcast RSS working * [WIP] more expanding on RSS * [WIP] Working on refactoring feed * Added UUID backfill to a migration * [WIP] Moar refactoring * [WIP] Adding UI for getting RSS feed * Many tests * Added conditional routing for feed URLs * Removed the need for url_base to be set * Updated preset name * Rendered certain fields HTML-safe; Added logging to confirm range request support * Fixed incorrect scheme issue * Updated env var * Updated other UI to use dropdown * removed commented code * docs * Added unique index to UUID fields
31 lines
725 B
Elixir
31 lines
725 B
Elixir
defmodule PinchflatWeb.Sources.SourceHTML do
|
|
use PinchflatWeb, :html
|
|
|
|
embed_templates "source_html/*"
|
|
|
|
@doc """
|
|
Renders a source form.
|
|
"""
|
|
attr :changeset, Ecto.Changeset, required: true
|
|
attr :action, :string, required: true
|
|
attr :media_profiles, :list, required: true
|
|
|
|
def source_form(assigns)
|
|
|
|
def friendly_index_frequencies do
|
|
[
|
|
{"Only once when first created", -1},
|
|
{"1 Hour", 60},
|
|
{"3 Hours", 3 * 60},
|
|
{"6 Hours", 6 * 60},
|
|
{"12 Hours", 12 * 60},
|
|
{"Daily (recommended)", 24 * 60},
|
|
{"Weekly", 7 * 24 * 60},
|
|
{"Monthly", 30 * 24 * 60}
|
|
]
|
|
end
|
|
|
|
def rss_feed_url(conn, source) do
|
|
url(conn, ~p"/sources/#{source.uuid}/feed") <> ".xml"
|
|
end
|
|
end
|