open-pod/lib/podcast_feed_web/views/feed_view.ex
danilo silva 6b042f65ab using json instaed of xml
removed hardcoded from generic podcast medatadata
2020-05-23 21:51:56 +00:00

11 lines
306 B
Elixir

defmodule PodcastFeedWeb.FeedView do
use PodcastFeedWeb, :view
def format_length(length) do
length |> IO.inspect
parsed = length / 100 / 60
min = parsed |> trunc
sec = parsed - min |> Float.floor(2) |> Float.to_string() |> String.split(".") |> Enum.at(1)
"#{min}:#{sec}"
end
end