supporting also item image as format for cover

This commit is contained in:
danilo silva 2020-06-07 21:19:18 +00:00
parent b52ba7117e
commit f565395819

View file

@ -103,7 +103,7 @@ defmodule PodcastFeed.Provider.Archive.Parser do
defp fetch_cover(%{identifier: identifier, archive_metadata: %{"files" => files}}) do
filename = files
|> Enum.filter(fn f -> f["source"] == "original" end)
|> Enum.filter(fn f -> f["format"] =~ ~r/JPG|JPEG|PNG|GIF/i end)
|> Enum.filter(fn f -> f["format"] =~ ~r/JPG|JPEG|PNG|GIF|Item Image/i end)
|> List.first()
|> case do
nil -> nil