Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update explicit tags for proper Apple/Google format #327

Merged
merged 2 commits into from
Dec 22, 2020
Merged

Update explicit tags for proper Apple/Google format #327

merged 2 commits into from
Dec 22, 2020

Conversation

chrisreddington
Copy link
Contributor

@chrisreddington chrisreddington commented Dec 13, 2020

As per #326, iTunes accepts true/false as the option for the itunes:explicit tag, whereas gogleplay accepts yes/no. This PR changes the rendered RSS feed to convert yes into true, and no into false for itunes:explicit.

Fixes #326

Signed-off-by: Chris Reddington [email protected]

@mattstratton
Copy link
Owner

I'm wondering if what we want to do is basically allow either "yes/no" as well as "true/false" as valid in the episode file, and then do the translation to the proper Apple/Google versions.

In pseudocode, something like this:

<itunes:explicit>{{ if eq . "yes" or "true" }}true{{ else }}false{{ end }}</itunes:explicit>
<googleplay:explicit>{{ if eq . "yes" or "true" }}yes{{ else }}no{{ end }}</googleplay:explicit>

(the "or" statement in those if examples is NOT accurate syntax; just using pseudocode to explain the logic)

this way you can use either "true/false" or "yes/no" in your episode files, and it will make the right format for Apple and Google.

Make sense?

@mattstratton
Copy link
Owner

maybe it's like this:

<itunes:explicit>{{ if (and (or (eq . "yes") (eq . "true"))) }}true{{ else }}false{{ end }}</itunes:explicit>
<googleplay:explicit>{{ if (and (or (eq . "yes") (eq . "true"))) }}yes{{ else }}no{{ end }}</googleplay:explicit>

You'll need to check my parens and also test this; I'm "coding" live in the github comment UI here :)

@mattstratton mattstratton changed the title Fixes #326 with no impact to current frontmatter docs Update explicit tags for proper Apple/Google format Dec 13, 2020
@chrisreddington
Copy link
Contributor Author

maybe it's like this:

<itunes:explicit>{{ if (and (or (eq . "yes") (eq . "true"))) }}true{{ else }}false{{ end }}</itunes:explicit>
<googleplay:explicit>{{ if (and (or (eq . "yes") (eq . "true"))) }}yes{{ else }}no{{ end }}</googleplay:explicit>

You'll need to check my parens and also test this; I'm "coding" live in the github comment UI here :)

Pretty much that! The and wouldn't be necessary, so have removed from both lines for simplicity and added to the PR :)

@mattstratton mattstratton merged commit 7d7d88c into mattstratton:master Dec 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] - <itunes:explicit> tag should be true/false not yes/no
2 participants