podcast

package
v0.0.0-...-97fc41f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2020 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddNewPodcast

func AddNewPodcast(dbClient db.Database, url string) error

AddNewPodcast takes RSS url and downloads contents inserts the podcast and its episodes into the db returns error if podcast already exists or connection error

func DoesEpisodeExist

func DoesEpisodeExist(dbClient db.Database, title string, pubDate *timestamp.Timestamp) (bool, error)

helpers

func DoesPodcastExist

func DoesPodcastExist(dbClient db.Database, rssURL string) bool

func FindEpisodeByID

func FindEpisodeByID(dbClient db.Database, id *protos.ObjectID) (*protos.Episode, error)

func FindEpisodeBySeason

func FindEpisodeBySeason(dbClient db.Database, podID *protos.ObjectID, seasonNum int, episodeNum int) (*protos.Episode, error)

FindEpisodeBySeason takes a season episode number returns error if not found

func FindEpisodesByRange

func FindEpisodesByRange(dbClient db.Database, podcastID *protos.ObjectID, start int64, end int64) ([]*protos.Episode, error)

FindEpisodes returns a list of episodes based on podcast id returns in chronological order, sectioned by start & end(exclusive)

func FindLatestEpisode

func FindLatestEpisode(dbClient db.Database, podcastID *protos.ObjectID) (*protos.Episode, error)

func FindLength

func FindLength(r io.Reader, fileLength int64) int64

FindLength attempts to download only the first few frames of the MP3 to figure out its length

func FindPodcastByID

func FindPodcastByID(dbClient db.Database, id *protos.ObjectID) (*protos.Podcast, error)

func FindPodcastsByIDs

func FindPodcastsByIDs(dbClient db.Database, ids []*protos.ObjectID) ([]*protos.Podcast, error)

func FindPodcastsByRange

func FindPodcastsByRange(dbClient db.Database, start, end int) ([]*protos.Podcast, error)

func GetPodcastResp

func GetPodcastResp(url string) (io.ReadCloser, int64, error)

func SearchPodcasts

func SearchPodcasts(dbClient db.Database, search string) ([]*protos.Podcast, error)

SearchPodcasts searches for a podcast given db and text string

func UpdatePodcasts

func UpdatePodcasts(dbClient db.Database) error

UpdatePodcasts attempts to go through the list of podcasts update them via RSS feed

func UpsertEpisode

func UpsertEpisode(dbClient db.Database, episode *protos.Episode) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL