mirror of
https://github.com/mxpv/podsync.git
synced 2024-05-11 05:55:04 +00:00
Override the default link
This will override the default link (usually the URL address) in the generated RSS feed with another link. fixes #233
This commit is contained in:
@ -95,6 +95,8 @@ vimeo = [ # Multiple keys will be rotated.
|
||||
author = "Mrs. Smith (mrs@smith.org)"
|
||||
ownerName = "Mrs. Smith"
|
||||
ownerEmail = "mrs@smith.org"
|
||||
# optional: this will override the default link (usually the URL address) in the generated RSS feed with another link
|
||||
link = "https://example.org"
|
||||
|
||||
# Podsync uses local database to store feeds and episodes metadata.
|
||||
# This section is optional and usually not needed to configure unless some very specific corner cases.
|
||||
|
@ -64,6 +64,7 @@ type Custom struct {
|
||||
Description string `toml:"description"`
|
||||
OwnerName string `toml:"ownerName"`
|
||||
OwnerEmail string `toml:"ownerEmail"`
|
||||
Link string `toml:"link"`
|
||||
}
|
||||
|
||||
type Cleanup struct {
|
||||
|
@ -41,6 +41,7 @@ func Build(_ctx context.Context, feed *model.Feed, cfg *Config, hostname string)
|
||||
author = feed.Title
|
||||
title = feed.Title
|
||||
description = feed.Description
|
||||
feedLink = feed.ItemURL
|
||||
)
|
||||
|
||||
if cfg.Custom.Author != "" {
|
||||
@ -55,7 +56,11 @@ func Build(_ctx context.Context, feed *model.Feed, cfg *Config, hostname string)
|
||||
description = cfg.Custom.Description
|
||||
}
|
||||
|
||||
p := itunes.New(title, feed.ItemURL, description, &feed.PubDate, &now)
|
||||
if cfg.Custom.Link != "" {
|
||||
feedLink = cfg.Custom.Link
|
||||
}
|
||||
|
||||
p := itunes.New(title, feedLink, description, &feed.PubDate, &now)
|
||||
p.Generator = podsyncGenerator
|
||||
p.AddSubTitle(title)
|
||||
p.IAuthor = author
|
||||
|
Reference in New Issue
Block a user