-
-
Notifications
You must be signed in to change notification settings - Fork 268
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Podcast Owner Custom Definitions per #171
Some users were saying their podcasts were getting rejected since `podcast.IOwner` wasn't being set. This PR adds that functionality to issue #171. * Did not disturb existing custom Author string, as users may already be using that (wasn't sure on the backwards compatibility with this repo). * "Name" needed a prefix, since there was already Title and Description. Picked `Owner` for now. * Added to existing Unit Test to ensure it gets set when custom config is used. NOTE: I do not have a way to test this as I do not use this repo. This is just a drive-by PR to help the authors.
- Loading branch information
1 parent
2751c4b
commit 1ae7f09
Showing
3 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,17 @@ timeout = 15 | |
quality = "low" | ||
filters = { title = "regex for title here" } | ||
clean = { keep_last = 10 } | ||
custom = { cover_art = "http://img", cover_art_quality = "high", category = "TV", subcategories = ["1", "2"], explicit = true, lang = "en" } | ||
custom = { | ||
cover_art = "http://img", | ||
cover_art_quality = "high", | ||
category = "TV", | ||
subcategories = ["1", "2"], | ||
explicit = true, | ||
lang = "en", | ||
author = "Mrs. Smith ([email protected])", | ||
ownerName = "Mrs. Smith", | ||
ownerEmail = "[email protected]" | ||
} | ||
` | ||
path := setup(t, file) | ||
defer os.Remove(path) | ||
|
@@ -77,6 +87,9 @@ timeout = 15 | |
assert.EqualValues(t, "TV", feed.Custom.Category) | ||
assert.True(t, feed.Custom.Explicit) | ||
assert.EqualValues(t, "en", feed.Custom.Language) | ||
assert.EqualValues(t, "Mrs. Smith ([email protected])", feed.Custom.Author) | ||
assert.EqualValues(t, "Mrs. Smith", feed.Custom.OwnerName) | ||
assert.EqualValues(t, "[email protected]", feed.Custom.OwnerEmail) | ||
|
||
assert.EqualValues(t, feed.Custom.Subcategories, []string{"1", "2"}) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters