podcast

package
v0.0.0-...-b3ccc9b Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderPodcasts

func RenderPodcasts(podcasts []Podcast, hostPrefix string) (string, error)

Types

type Config

type Config struct {
	FileHome string `json:"file_home"`
}

type Episode

type Episode struct {
	Name             string `json:"name"`
	Id               string `json:"id"`
	Description      string `json:"description"`
	AudioFile        string `json:"audio_file"`
	Length           int64  `json:"audio_length_sec"`
	ReadOrder        int    `json:"read_order"`
	PublishTimestamp int64  `json:"publish_timestamp"`
}

type Podcast

type Podcast struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Id          string `json:"id"`
	ImageFile   string `json:"image_file"`

	Episodes          []*Episode `json:"episodes,omitempty"`
	RSSUrl            string     `json:"rss_url"`
	DisableAutoUpdate bool       `json:"disable_auto_update,omitempty"`
	LatestEpisode     *Episode   `json:"latest_episode"`
	// contains filtered or unexported fields
}

func AddPodcast

func AddPodcast(config Config, RSSUrl string) (*Podcast, error)

func NewPodcastObj

func NewPodcastObj() Podcast

func (*Podcast) GetAudioFile

func (p *Podcast) GetAudioFile(config Config, episodeId string) (string, error)

func (*Podcast) GetImage

func (p *Podcast) GetImage(config Config) string

func (*Podcast) SavePodcastMetadata

func (p *Podcast) SavePodcastMetadata(config Config) error

func (*Podcast) SyncPodcastEpisode

func (p *Podcast) SyncPodcastEpisode(config Config, episode *Episode) error

func (*Podcast) Update

func (p *Podcast) Update(config Config) error

type PodcastWatcher

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

func NewPodcastWatcher

func NewPodcastWatcher(config Config) PodcastWatcher

func (*PodcastWatcher) EnqueuePodcast

func (pw *PodcastWatcher) EnqueuePodcast(podcast Podcast)

func (*PodcastWatcher) GetPodcast

func (pw *PodcastWatcher) GetPodcast(id string) (*Podcast, error)

func (*PodcastWatcher) ListPodcasts

func (pw *PodcastWatcher) ListPodcasts() ([]Podcast, error)

func (*PodcastWatcher) QueueEmpty

func (pw *PodcastWatcher) QueueEmpty() bool

func (*PodcastWatcher) RefreshPodcastMetadataCache

func (pw *PodcastWatcher) RefreshPodcastMetadataCache() ([]Podcast, error)

func (*PodcastWatcher) RegisterUpdating

func (pw *PodcastWatcher) RegisterUpdating(podcast Podcast, threadIdx int) bool

RegisterUpdating returns if podcast is already updating

func (*PodcastWatcher) Run

func (pw *PodcastWatcher) Run(config Config)

func (*PodcastWatcher) Stop

func (pw *PodcastWatcher) Stop()

func (*PodcastWatcher) UnRegisterUpdating

func (pw *PodcastWatcher) UnRegisterUpdating(podcast Podcast)

Jump to

Keyboard shortcuts

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