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:
@@ -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]
|
||||
|
@@ -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(),
|
||||
}
|
||||
|
||||
|
@@ -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 {
|
||||
|
@@ -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,
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user