Metalove v0.2.2 Metalove.PodcastFeed View Source

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

Link to this section 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

Link to this section Types

Link to this type

t() View Source
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(),
  feed_url: String.t(),
  image_url: String.t() | nil,
  language: String.t() | nil,
  link: term(),
  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
  • :title Title
  • :language
  • :author
  • :contributors
  • :summary
  • :description
  • :image_url
  • :categories
  • :copyright
  • :episodes list of episode id tuples, for a paged feed that eventually contains all

Link to this section Functions

Link to this function

fetch_and_parse(feed_url) View Source

Link to this function

get_by_feed_url(url) View Source
get_by_feed_url(String.t()) :: Metalove.PodcastFeed.t() | nil

Existing Metalove.PodcastFeed for that url, otherwise nil

Link to this function

get_by_feed_url_await_all_metdata(url, timeout \\ 30000) View Source

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.

Link to this function

get_by_feed_url_await_all_pages(url, timeout \\ 30000) View Source

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

Link to this function

scrape_episode_metadata(episode_ids) View Source

Scrape metadata from the episode media files if possible.