 
   def find_or_create_alternate_feeds(alternate_feeds_map, feed_id) do
     for {uuid, alternate_feed_map} <- alternate_feeds_map do
-      case Repo.get_by(AlternateFeed, url: alternate_feed_map[:url])
-        nil -> %AlternateFeed(feed_id: feed_id)
+      case Repo.get_by(Pan.AlternateFeed, url: alternate_feed_map[:url])
+        nil -> %Pan.AlternateFeed(feed_id: feed_id)
                |> Map.merge(alternate_feed_map)
                |> Repo.insert()
         alternate_feed -> {:ok, alternate_feed}

defmodule Pan.Parser.Persistor do
  use Pan.Web, :controller
  alias Pan.User

  def call(map) do
    podcast_map = Map.drop(map, [:episodes, :feed, :contributors])
    feed_map =    Map.drop(map[:feed], [:alternate_feeds])
    alternate_feeds_map = map[:feed][:alternate_feeds]

map[:contributors]

#    {:ok ,owner }  = find_or_create_owner(map[:owner])
#    {:ok, podcast} = find_or_create_podcast(map[:podcast], owner.id)

  end


  def find_or_create_contributor(contributor_map) do
    case Repo.get_by(Pan.Contributor, uri: contributor_map[:uri]) do
      nil -> %Pan.Contributor()
             |> Map.merge(contributor_map)
             |> Repo.insert()
      contributor -> {:ok, contributor}
