1
0
mirror of https://github.com/mxpv/podsync.git synced 2024-05-11 05:55:04 +00:00

add support to set feed as private

This commit is contained in:
Matej Drobnic
2022-04-02 10:28:22 +02:00
parent b82bb3547b
commit e76f43f4d4
5 changed files with 11 additions and 0 deletions

View File

@@ -63,6 +63,9 @@ vimeo = [ # Multiple keys will be rotated.
# Note that setting '--audio-format' for audio format feeds, or '--format' or '--output' for any format may cause
# unexpected behaviour. You should only use this if you know what you are doing, and have read up on youtube-dl's options!
youtube_dl_args = ["--write-sub", "--embed-subs", "--sub-lang", "en,en-US,en-GB"]
# When set to true, podcasts indexers such as iTunes or Google Podcasts will not index this podcast
private_feed = true
# Optional feed customizations
[feeds.ID1.custom]

View File

@@ -399,6 +399,7 @@ func (yt *YouTubeBuilder) Build(ctx context.Context, cfg *feed.Config) (*model.F
CoverArtQuality: cfg.Custom.CoverArtQuality,
PageSize: cfg.PageSize,
PlaylistSort: cfg.PlaylistSort,
PrivateFeed: cfg.PrivateFeed,
UpdatedAt: time.Now().UTC(),
}

View File

@@ -40,6 +40,8 @@ type Config struct {
OPML bool `toml:"opml"`
// Playlist sort
PlaylistSort model.Sorting `toml:"playlist_sort"`
// Private feed (not indexed by podcast aggregators)
PrivateFeed bool `toml:"private_feed"`
}
type Filters struct {

View File

@@ -61,6 +61,10 @@ func Build(_ctx context.Context, feed *model.Feed, cfg *Config, hostname string)
p.IAuthor = author
p.AddSummary(description)
if (feed.PrivateFeed) {
p.IBlock = "yes"
}
if cfg.Custom.OwnerName != "" && cfg.Custom.OwnerEmail != "" {
p.IOwner = &itunes.Author{
Name: cfg.Custom.OwnerName,

View File

@@ -63,6 +63,7 @@ type Feed struct {
Episodes []*Episode `json:"-"` // Array of episodes
UpdatedAt time.Time `json:"updated_at"`
PlaylistSort Sorting `json:"playlist_sort"`
PrivateFeed bool `json:"private_feed"`
}
type EpisodeStatus string