Metalove.Enclosure (Metalove v0.5.0)

View Source

Defines a Metalove.Enclosure struct representing enclosures in Metalove.Episodes. Provides access to parsed metadata.

Summary

Types

t()

Representation of an Enclosure.

Functions

Fetch enough of the URL to parse the ID3 metadata if present.

Types

t()

@type t() :: %Metalove.Enclosure{
  created_at: DateTime.t(),
  fetched_metadata_at: nil | DateTime.t(),
  metadata: nil | map(),
  resolved_url: nil | String.t(),
  size: nil | non_neg_integer(),
  type: nil | String.t(),
  url: nil | String.t()
}

Representation of an Enclosure.

Interesting fields:

  • metadata a map of found metadata, interesting keys are chapters and cover_art

Functions

fetch_id3_metadata(url)

Fetch enough of the URL to parse the ID3 metadata if present.

fetch_metadata(enclosure)

infer_mime_type(url)