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:
Johannes Hoppe
2022-06-24 00:21:28 +02:00
parent 5d8b3ee3fd
commit 44f4f3586c
3 changed files with 9 additions and 1 deletions
+2
View File
@@ -95,6 +95,8 @@ vimeo = [ # Multiple keys will be rotated.
author = "Mrs. Smith ([email protected])"
ownerName = "Mrs. Smith"
ownerEmail = "[email protected]"
# 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.
+1
View File
@@ -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 {
+6 -1
View File
@@ -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