 
 
   def find_or_create_podcast(podcast_map, owner_id) do
-    case Repo.get_by(Podcast, title: podcast_map[:title]) do
-      nil -> %Podcast{owner_id: owner_id}
+    case Repo.get_by(Pan.Podcast, title: podcast_map[:title]) do
+      nil -> %Pan.Podcast{owner_id: owner_id}
              |> Map.merge(podcast_map)
              |> Repo.insert()
       podcast -> {:ok, podcast}

  end


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


  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(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}
