podcast

package
v0.0.0-...-5edc56a Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FieldAuthor      = "author"
	FieldDate        = "date"
	FieldDescription = "desc"
	FieldSeries      = "series"
	FieldTitle       = "title"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Episode

type Episode struct {
	gorm.Model
	SID         string // series ID
	EID         string `gorm:"uniqueIndex:idx_episode"` // GUID
	Title       string
	Author      string
	Link        string
	Description string
	ContentType string
	Size        int64
	URL         string
	Date        time.Time // publish time
}

type Podcast

type Podcast struct {
	// contains filtered or unexported fields
}

func NewPodcast

func NewPodcast(config *config.Config) *Podcast

func (*Podcast) Close

func (p *Podcast) Close()

func (*Podcast) EpisodeImage

func (p *Podcast) EpisodeImage(episode Episode) string

func (*Podcast) EpisodeURL

func (p *Podcast) EpisodeURL(e Episode) *url.URL

func (*Podcast) Episodes

func (p *Podcast) Episodes(series Series) []Episode

func (*Podcast) FindEpisode

func (p *Podcast) FindEpisode(identifier string) (Episode, error)

func (*Podcast) FindSeries

func (p *Podcast) FindSeries(identifier string) (Series, error)

func (*Podcast) HasPodcasts

func (p *Podcast) HasPodcasts() bool

func (*Podcast) LookupEID

func (p *Podcast) LookupEID(eid string) (Episode, error)

func (*Podcast) LookupEpisode

func (p *Podcast) LookupEpisode(id int) (Episode, error)

func (*Podcast) LookupSID

func (p *Podcast) LookupSID(sid string) (Series, error)

func (*Podcast) LookupSeries

func (p *Podcast) LookupSeries(id int) (Series, error)

func (*Podcast) Open

func (p *Podcast) Open() (err error)

func (*Podcast) RecentEpisodes

func (p *Podcast) RecentEpisodes() []Episode

func (*Podcast) RecentSeries

func (p *Podcast) RecentSeries() []Series

func (*Podcast) Search

func (p *Podcast) Search(q string, limit ...int) (series []Series, episodes []Episode)

func (*Podcast) Series

func (p *Podcast) Series() []Series

func (*Podcast) SeriesCount

func (p *Podcast) SeriesCount() int64

func (*Podcast) SeriesImage

func (p *Podcast) SeriesImage(series Series) string

func (*Podcast) Sync

func (p *Podcast) Sync() error

func (*Podcast) SyncSince

func (p *Podcast) SyncSince(lastSync time.Time) error

type Series

type Series struct {
	gorm.Model
	SID         string `gorm:"uniqueIndex:idx_series"` // hash of link
	Title       string
	Description string
	Author      string
	Link        string
	Image       string
	Copyright   string
	Date        time.Time // last build date
	TTL         int
}

func (Series) TableName

func (Series) TableName() string

Jump to

Keyboard shortcuts

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