   def import_new_episodes(podcast, current_user \\ nil) do
     with {:ok, _podcast} <- set_next_update(podcast),
          {:ok, feed} <- Feed.get_by_podcast_id(podcast.id),
-         {:ok, map} <- RssFeed.import_to_map(feed.self_link_url, podcast.id, true), # do check for changes!
+         # do check for changes!
+         {:ok, map} <- RssFeed.import_to_map(feed.self_link_url, podcast.id, true),
          {:ok, _} <- Persistor.delta_import(map, podcast.id),
          {:ok, _} <- unpause_and_reset_failure_count(podcast) do
       notify_user(current_user, {:ok, "imported"}, podcast)


  defp unpause_and_reset_failure_count(podcast) do
    PanWeb.Podcast.changeset(podcast, %{update_paused: false, failure_count: 0})
    |> Repo.update([force: true])
  end


  defp increase_failure_count(podcast) do
    Podcast.changeset(podcast, %{failure_count: (podcast.failure_count || 0) + 1})
    |> Repo.update([force: true])

    if podcast.failure_count == 9 do
      Podcast.changeset(podcast, %{retired: true})
      |> Repo.update([force: true])
    end
  end
end

  end

  defp notify_user(nil, _, _), do: nil

  defp notify_user(current_user, {status, message}, podcast) do
    notification = build_notification(podcast, {status, message}, current_user)
    Endpoint.broadcast("mailboxes:#{current_user.id}", "notification", notification)
