service

package
v0.0.0-...-44e2b1c Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2022 License: GPL-3.0 Imports: 29 Imported by: 1

Documentation

Index

Constants

View Source
const (
	PODCASTINDEX_KEY    = "LNGTNUAFVL9W2AQKVZ49"
	PODCASTINDEX_SECRET = "H8tq^CZWYmAywbnngTwB$rwQHwMSR8#fJb#Bhgb3"
)
View Source
const BASE = "https://gpodder.net"
View Source
const ITUNES_BASE = "https://itunes.apple.com"

Variables

Functions

func AddOpml

func AddOpml(content string) error

func AddPodcast

func AddPodcast(url string) (db.Podcast, error)

func AddPodcastItems

func AddPodcastItems(podcast *db.Podcast, newPodcast bool) error

func AddTag

func AddTag(label, description string) (db.Tag, error)

func ByTag

func ByTag(tag string, count int) []model.GPodcast

func CheckMissingFiles

func CheckMissingFiles() error

func CreateBackup

func CreateBackup() (string, error)

func CreateNfoFile

func CreateNfoFile(podcast *db.Podcast) error

func DeleteEpisodeFile

func DeleteEpisodeFile(podcastItemId string) error

func DeleteFile

func DeleteFile(filePath string) error

func DeletePodcast

func DeletePodcast(id string, deleteFiles bool) error

func DeletePodcastEpisodes

func DeletePodcastEpisodes(id string) error

func DeleteTag

func DeleteTag(id string) error

func Download

func Download(link string, episodeTitle string, podcastName string, prefix string) (string, error)

func DownloadImage

func DownloadImage(link string, episodeId string, podcastName string) (string, error)

func DownloadMissingEpisodes

func DownloadMissingEpisodes() error

func DownloadMissingImages

func DownloadMissingImages() error

func DownloadPodcastCoverImage

func DownloadPodcastCoverImage(link string, podcastName string) (string, error)

func DownloadSingleEpisode

func DownloadSingleEpisode(podcastItemId string) error

func ExportOmpl

func ExportOmpl(usePodgrabLink bool, baseUrl string) ([]byte, error)

func FetchURL

func FetchURL(url string) (model.PodcastData, []byte, error)

FetchURL is

func FileExists

func FileExists(filePath string) bool

func GetAllBackupFiles

func GetAllBackupFiles() ([]string, error)

func GetAllPodcastItemsByIds

func GetAllPodcastItemsByIds(podcastItemIds []string) (*[]db.PodcastItem, error)

func GetAllPodcastItemsByPodcastIds

func GetAllPodcastItemsByPodcastIds(podcastIds []string) *[]db.PodcastItem

func GetAllPodcasts

func GetAllPodcasts(sorting string) *[]db.Podcast

func GetFileSize

func GetFileSize(path string) (int64, error)

func GetFileSizeFromUrl

func GetFileSizeFromUrl(url string) (int64, error)

func GetPodcastById

func GetPodcastById(id string) *db.Podcast

func GetPodcastItemById

func GetPodcastItemById(id string) *db.PodcastItem

func GetPodcastLocalImagePath

func GetPodcastLocalImagePath(link string, podcastName string) string

func GetPodcastPrefix

func GetPodcastPrefix(item *db.PodcastItem, setting *db.Setting) string

func GetSearchFromGpodder

func GetSearchFromGpodder(pod model.GPodcast) *model.CommonSearchResultModel

func GetSearchFromPodcastIndex

func GetSearchFromPodcastIndex(pod *podcastindex.Podcast) *model.CommonSearchResultModel

func GetTagsByIds

func GetTagsByIds(ids []string) *[]db.Tag

func NatualTime

func NatualTime(base, value time.Time) string

func ParseOpml

func ParseOpml(content string) (model.OpmlModel, error)

func Query

func RefreshEpisodes

func RefreshEpisodes() error

func SetAllEpisodesToDownload

func SetAllEpisodesToDownload(podcastId string) error

func SetPodcastItemAsDownloaded

func SetPodcastItemAsDownloaded(id string, location string) error

func SetPodcastItemAsNotDownloaded

func SetPodcastItemAsNotDownloaded(id string, downloadStatus db.DownloadStatus) error

func SetPodcastItemAsQueuedForDownload

func SetPodcastItemAsQueuedForDownload(id string) error

func SetPodcastItemBookmarkStatus

func SetPodcastItemBookmarkStatus(id string, bookmark bool) error

func SetPodcastItemPlayedStatus

func SetPodcastItemPlayedStatus(id string, isPlayed bool) error

func Tags

func Tags(count int) []model.GPodcastTag

func TogglePodcastPause

func TogglePodcastPause(id string, isPaused bool) error

func Top

func Top(count int) []model.GPodcast

func UnlockMissedJobs

func UnlockMissedJobs()

func UpdateAllFileSizes

func UpdateAllFileSizes()

func UpdateSettings

func UpdateSettings(downloadOnAdd bool, initialDownloadCount int, autoDownload bool,
	appendDateToFileName bool, appendEpisodeNumberToFileName bool, darkMode bool, downloadEpisodeImages bool,
	generateNFOFile bool, dontDownloadDeletedFromDisk bool, baseUrl string, maxDownloadConcurrency int, userAgent string) error

Types

type ItunesService

type ItunesService struct {
}

func (ItunesService) Query

func (service ItunesService) Query(q string) []*model.CommonSearchResultModel

type PodcastIndexService

type PodcastIndexService struct {
}

func (PodcastIndexService) Query

type SearchService

type SearchService interface {
	Query(q string) []*model.CommonSearchResultModel
}

Jump to

Keyboard shortcuts

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