mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-02-17 11:04:22 +01:00
Completely remove channel_url_root
This commit is contained in:
parent
d5215e38ed
commit
c218e50c1f
1 changed files with 0 additions and 7 deletions
|
@ -1,9 +1,6 @@
|
||||||
defmodule PhilomenaWeb.ChannelView do
|
defmodule PhilomenaWeb.ChannelView do
|
||||||
use PhilomenaWeb, :view
|
use PhilomenaWeb, :view
|
||||||
|
|
||||||
def channel_image(%{channel_image: image, is_live: false}) when image not in [nil, ""],
|
|
||||||
do: channel_url_root() <> "/" <> image
|
|
||||||
|
|
||||||
def channel_image(%{type: "LivestreamChannel", short_name: short_name}) do
|
def channel_image(%{type: "LivestreamChannel", short_name: short_name}) do
|
||||||
now = DateTime.utc_now() |> DateTime.to_unix(:microsecond)
|
now = DateTime.utc_now() |> DateTime.to_unix(:microsecond)
|
||||||
|
|
||||||
|
@ -23,8 +20,4 @@ defmodule PhilomenaWeb.ChannelView do
|
||||||
Camo.Image.image_url(
|
Camo.Image.image_url(
|
||||||
"https://static-cdn.jtvnw.net/previews-ttv/live_user_#{String.downcase(short_name)}-320x180.jpg"
|
"https://static-cdn.jtvnw.net/previews-ttv/live_user_#{String.downcase(short_name)}-320x180.jpg"
|
||||||
)
|
)
|
||||||
|
|
||||||
defp channel_url_root do
|
|
||||||
Application.get_env(:philomena, :channel_url_root)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue