Documentation ¶
Index ¶
- Variables
- func AddTagToPodcast(id, tagId string) error
- func CreatePodcast(podcast *Podcast) error
- func CreatePodcastItem(podcastItem *PodcastItem) error
- func CreateTag(tag *Tag) error
- func DeletePodcastById(id string) error
- func DeletePodcastItemById(id string) error
- func DeleteTagById(id string) error
- func ExecuteAndSaveMigration(name string, query string) error
- func ForceSetLastEpisodeDate(podcastId string)
- func GetAllPodcastItems(podcasts *[]PodcastItem) error
- func GetAllPodcastItemsAlreadyDownloaded() (*[]PodcastItem, error)
- func GetAllPodcastItemsByIds(podcastItemIds []string) (*[]PodcastItem, error)
- func GetAllPodcastItemsByPodcastId(podcastId string, podcastItems *[]PodcastItem) error
- func GetAllPodcastItemsByPodcastIds(podcastIds []string, podcastItems *[]PodcastItem) error
- func GetAllPodcastItemsToBeDownloaded() (*[]PodcastItem, error)
- func GetAllPodcastItemsWithoutImage() (*[]PodcastItem, error)
- func GetAllPodcastItemsWithoutSize() (*[]PodcastItem, error)
- func GetAllPodcasts(podcasts *[]Podcast, sorting string) error
- func GetAllTags(sorting string) (*[]Tag, error)
- func GetDB() *gorm.DB
- func GetEpisodeNumber(podcastItemId, podcastId string) (int, error)
- func GetPaginatedPodcastItems(page int, count int, downloadedOnly *bool, playedOnly *bool, ...) error
- func GetPaginatedPodcastItemsNew(queryModel model.EpisodesFilter) (*[]PodcastItem, int64, error)
- func GetPaginatedTags(page int, count int, tags *[]Tag, total *int64) error
- func GetPodcastById(id string, podcast *Podcast) error
- func GetPodcastByTitleAndAuthor(title string, author string, podcast *Podcast) error
- func GetPodcastByURL(url string, podcast *Podcast) error
- func GetPodcastEpisodeStats() (*[]PodcastItemStatsModel, error)
- func GetPodcastItemById(id string, podcastItem *PodcastItem) error
- func GetPodcastItemByPodcastIdAndGUID(podcastId string, guid string, podcastItem *PodcastItem) error
- func GetPodcastItemsByPodcastIdAndGUIDs(podcastId string, guids []string) (*[]PodcastItem, error)
- func GetPodcastsByURLList(urls []string, podcasts *[]Podcast) error
- func GetTagsByIds(ids []string) (*[]Tag, error)
- func Init() (*gorm.DB, error)
- func Lock(name string, duration int)
- func Migrate()
- func RemoveTagFromPodcast(id, tagId string) error
- func RunMigrations()
- func SetAllEpisodesToDownload(podcastId string) error
- func TogglePodcastPauseStatus(podcastId string, isPaused bool) error
- func Unlock(name string)
- func UnlockMissedJobs()
- func UntagAllByTagId(tagId string) error
- func UpdateLastEpisodeDateForPodcast(podcastId string, lastEpisode time.Time) error
- func UpdatePodcast(podcast *Podcast) error
- func UpdatePodcastItem(podcastItem *PodcastItem) error
- func UpdatePodcastItemFileSize(podcastItemId string, size int64) error
- func UpdateSettings(setting *Setting) error
- func UpdateTag(tag *Tag) error
- type Base
- type DownloadStatus
- type JobLock
- type Migration
- type Podcast
- type PodcastItem
- type PodcastItemConsolidateDiskStatsModel
- type PodcastItemDiskStatsModel
- type PodcastItemStatsModel
- type Setting
- type Tag
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *gorm.DB
DB is
Functions ¶
func AddTagToPodcast ¶
func CreatePodcast ¶
func CreatePodcastItem ¶
func CreatePodcastItem(podcastItem *PodcastItem) error
func DeletePodcastById ¶
func DeletePodcastItemById ¶
func DeleteTagById ¶
func ExecuteAndSaveMigration ¶
func ForceSetLastEpisodeDate ¶
func ForceSetLastEpisodeDate(podcastId string)
func GetAllPodcastItems ¶
func GetAllPodcastItems(podcasts *[]PodcastItem) error
func GetAllPodcastItemsAlreadyDownloaded ¶
func GetAllPodcastItemsAlreadyDownloaded() (*[]PodcastItem, error)
func GetAllPodcastItemsByIds ¶
func GetAllPodcastItemsByIds(podcastItemIds []string) (*[]PodcastItem, error)
func GetAllPodcastItemsByPodcastId ¶
func GetAllPodcastItemsByPodcastId(podcastId string, podcastItems *[]PodcastItem) error
func GetAllPodcastItemsByPodcastIds ¶
func GetAllPodcastItemsByPodcastIds(podcastIds []string, podcastItems *[]PodcastItem) error
func GetAllPodcastItemsToBeDownloaded ¶
func GetAllPodcastItemsToBeDownloaded() (*[]PodcastItem, error)
func GetAllPodcastItemsWithoutImage ¶
func GetAllPodcastItemsWithoutImage() (*[]PodcastItem, error)
func GetAllPodcastItemsWithoutSize ¶
func GetAllPodcastItemsWithoutSize() (*[]PodcastItem, error)
func GetAllPodcasts ¶
func GetAllTags ¶
func GetEpisodeNumber ¶
func GetPaginatedPodcastItemsNew ¶
func GetPaginatedPodcastItemsNew(queryModel model.EpisodesFilter) (*[]PodcastItem, int64, error)
func GetPodcastById ¶
func GetPodcastByURL ¶
func GetPodcastEpisodeStats ¶
func GetPodcastEpisodeStats() (*[]PodcastItemStatsModel, error)
func GetPodcastItemById ¶
func GetPodcastItemById(id string, podcastItem *PodcastItem) error
func GetPodcastItemByPodcastIdAndGUID ¶
func GetPodcastItemByPodcastIdAndGUID(podcastId string, guid string, podcastItem *PodcastItem) error
func GetPodcastItemsByPodcastIdAndGUIDs ¶
func GetPodcastItemsByPodcastIdAndGUIDs(podcastId string, guids []string) (*[]PodcastItem, error)
func GetPodcastsByURLList ¶
func GetTagsByIds ¶
func RemoveTagFromPodcast ¶
func RunMigrations ¶
func RunMigrations()
func UnlockMissedJobs ¶
func UnlockMissedJobs()
func UntagAllByTagId ¶
func UpdatePodcast ¶
func UpdatePodcastItem ¶
func UpdatePodcastItem(podcastItem *PodcastItem) error
func UpdateSettings ¶
Types ¶
type Base ¶
type Base struct { ID string `sql:"type:uuid;primary_key"` CreatedAt time.Time UpdatedAt time.Time DeletedAt *time.Time `gorm:"index"` }
Base is
type DownloadStatus ¶
type DownloadStatus int
const ( NotDownloaded DownloadStatus = iota Downloading Downloaded Deleted )
type Podcast ¶
type Podcast struct { Base Title string Summary string `gorm:"type:text"` Author string Image string URL string LastEpisode *time.Time PodcastItems []PodcastItem Tags []*Tag `gorm:"many2many:podcast_tags;"` DownloadedEpisodesCount int `gorm:"-"` DownloadingEpisodesCount int `gorm:"-"` AllEpisodesCount int `gorm:"-"` DownloadedEpisodesSize int64 `gorm:"-"` DownloadingEpisodesSize int64 `gorm:"-"` AllEpisodesSize int64 `gorm:"-"` IsPaused bool `gorm:"default:false"` }
Podcast is
type PodcastItem ¶
type PodcastItem struct { Base PodcastID string Podcast Podcast Title string Summary string `gorm:"type:text"` EpisodeType string Duration int PubDate time.Time FileURL string GUID string Image string DownloadDate time.Time DownloadPath string DownloadStatus DownloadStatus `gorm:"default:0"` IsPlayed bool `gorm:"default:false"` BookmarkDate time.Time LocalImage string FileSize int64 }
PodcastItem is
type PodcastItemConsolidateDiskStatsModel ¶
type PodcastItemConsolidateDiskStatsModel struct { Downloaded int64 Downloading int64 NotDownloaded int64 Deleted int64 PendingDownload int64 }
func GetPodcastEpisodeDiskStats ¶
func GetPodcastEpisodeDiskStats() (PodcastItemConsolidateDiskStatsModel, error)
type PodcastItemDiskStatsModel ¶
type PodcastItemDiskStatsModel struct { DownloadStatus DownloadStatus Count int Size int64 }
type PodcastItemStatsModel ¶
type PodcastItemStatsModel struct { PodcastID string DownloadStatus DownloadStatus Count int Size int64 }
type Setting ¶
type Setting struct { Base DownloadOnAdd bool `gorm:"default:true"` InitialDownloadCount int `gorm:"default:5"` AutoDownload bool `gorm:"default:true"` AppendDateToFileName bool `gorm:"default:false"` AppendEpisodeNumberToFileName bool `gorm:"default:false"` DarkMode bool `gorm:"default:false"` DownloadEpisodeImages bool `gorm:"default:false"` GenerateNFOFile bool `gorm:"default:false"` DontDownloadDeletedFromDisk bool `gorm:"default:false"` BaseUrl string MaxDownloadConcurrency int `gorm:"default:5"` UserAgent string }
func GetOrCreateSetting ¶
func GetOrCreateSetting() *Setting
Click to show internal directories.
Click to hide internal directories.