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

iTunes explicit tag extended to 'yes', 'no', or 'clean' #51

Merged
merged 3 commits into from
Mar 29, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export class Podcast {
});

customElements.push({
"itunes:explicit": !!options.itunesExplicit,
"itunes:explicit": typeof options.itunesExplicit === "boolean" ? !!options.itunesExplicit : options.itunesExplicit,
JumpLink marked this conversation as resolved.
Show resolved Hide resolved
});

if (options.itunesCategory) {
Expand Down Expand Up @@ -178,7 +178,7 @@ export class Podcast {
});
}
customElements.push({
"itunes:explicit": !!itemOptions.itunesExplicit,
"itunes:explicit": typeof itemOptions.itunesExplicit === "boolean" ? !!itemOptions.itunesExplicit : itemOptions.itunesExplicit,
JumpLink marked this conversation as resolved.
Show resolved Hide resolved
});
if (itemOptions.itunesDuration) {
customElements.push({
Expand Down
1 change: 1 addition & 0 deletions src/types/feed-itunes-explicit.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export type FeedItunesExplicit = boolean | ('yes' | 'no' | 'clean')
3 changes: 2 additions & 1 deletion src/types/feed-itunes.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { FeedItunesCategory } from "./feed-itunes-category";
import { FeedItunesExplicit } from "./feed-itunes-explicit";
import { FeedItunesOwner } from "./feed-itunes-owner";
import { FeedItunesType } from "./feed-itunes-type";

Expand All @@ -7,7 +8,7 @@ export interface FeedITunes {
itunesSubtitle?: string;
itunesSummary?: string;
itunesOwner?: FeedItunesOwner;
itunesExplicit?: boolean;
itunesExplicit?: FeedItunesExplicit;
itunesCategory?: FeedItunesCategory[];
itunesImage?: string;
itunesType?: FeedItunesType;
Expand Down
1 change: 1 addition & 0 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export * from "./deprecate";
export * from "./feed-custom-element";
export * from "./feed-itunes-category";
export * from "./feed-itunes-category-elements";
export * from "./feed-itunes-explicit";
export * from "./feed-itunes-owner";
export * from "./feed-itunes-type";
export * from "./feed-itunes";
Expand Down
2 changes: 1 addition & 1 deletion src/types/item-itunes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export interface ItemITunes {
/** (iTunes specific) author of the podcast */
itunesAuthor?: string;
/** (iTunes specific) specifies if the podcast contains explicit content */
itunesExplicit?: boolean;
itunesExplicit?: boolean | ('yes' | 'no' | 'clean');
JumpLink marked this conversation as resolved.
Show resolved Hide resolved
/** (iTunes specific) subtitle for iTunes listing */
itunesSubtitle?: string;
/** (iTunes specific) summary for iTunes listing */
Expand Down