Metalove.PodcastFeed (Metalove v0.5.0)

View Source

Defines a Metalove.PodcastFeed struct to represent a scraped and parsed feed. Belongs to an Metalove.Podcast and has Metalove.Episodes

Summary

Types

t()

Represents a podcast feed.

Functions

Existing Metalove.PodcastFeed for that url, otherwise nil

Existing Metalove.PodcastFeed for that url after all metadata is fetched, otherwise nil. Make sure to trigger the metadata media fetch first by calling Metalove.PodcastFeed.trigger_episode_metadata_scrape(feed) with all episodes present.

Existing Metalove.PodcastFeed for that url after all pages are fetched, otherwise nil

Scrape metadata from the episode media files if possible.

Types

t()

@type t() :: %Metalove.PodcastFeed{
  author: String.t() | nil,
  categories: list() | nil,
  contributors: list() | nil,
  copyright: String.t() | nil,
  created_at: DateTime.t(),
  description: String.t() | nil,
  episodes: list(),
  explicit: boolean(),
  feed_url: String.t(),
  guid: String.t(),
  image_url: String.t() | nil,
  language: String.t() | nil,
  link: term(),
  owner: Map.t() | nil,
  subtitle: term(),
  summary: String.t() | nil,
  title: String.t() | nil,
  updated_at: DateTime.t(),
  waiting_for_pages: boolean()
}

Represents a podcast feed.

Fields:

  • :feed_url URL of that feed
  • :guid
  • :title Title
  • :language
  • :author
  • :owner
  • :contributors
  • :summary
  • :description
  • :image_url
  • :categories
  • :copyright
  • :explicit
  • :episodes list of episode id tuples, for a paged feed that eventually contains all

Functions

fetch_and_parse(feed_url)

get_by_feed_url(url)

@spec get_by_feed_url(String.t()) :: t() | nil

Existing Metalove.PodcastFeed for that url, otherwise nil

get_by_feed_url_await_all_metdata(url, timeout \\ 30000)

Existing Metalove.PodcastFeed for that url after all metadata is fetched, otherwise nil. Make sure to trigger the metadata media fetch first by calling Metalove.PodcastFeed.trigger_episode_metadata_scrape(feed) with all episodes present.

get_by_feed_url_await_all_pages(url, timeout \\ 30000)

Existing Metalove.PodcastFeed for that url after all pages are fetched, otherwise nil

scrape_episode_metadata(episode_ids)

Scrape metadata from the episode media files if possible.

spread_list(list, count)