Skip to content

Commit

Permalink
Merge pull request #370 from stevencrader/add-episodes.fm
Browse files Browse the repository at this point in the history
Add episodes.fm
  • Loading branch information
daveajones authored May 20, 2024
2 parents 3089cc7 + d26f0f5 commit 71e6a89
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ui/images/episodesfm.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 13 additions & 1 deletion ui/src/components/PodcastHeader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Value from '../Value'
import NoImage from '../../../images/no-cover-art.png'
import { truncateString } from '../../utils'
import RSSLogo from "../../../images/feed.svg";
import EpisodesFMLogo from "../../../images/episodesfm.svg";
import PodcastAPLogo from "../../../images/podcastap.svg";
import DonationPage from "../../../images/donation-page.svg";
import EarthLogo from "../../../images/earth.svg";
Expand All @@ -18,6 +19,7 @@ interface IProps {
categories?: any
image?: any
id?: string
itunesId?: string
feedURL?: string
podcastURL?: string
donationPageURL?: string
Expand Down Expand Up @@ -81,7 +83,7 @@ export default class PodcastHeader extends React.PureComponent<IProps, PodState>
}

render() {
const {title, description, author, categories, image, id, feedURL, donationPageURL, podcastURL, value} = this.props
const {title, description, author, categories, image, id, feedURL, donationPageURL, podcastURL, value, itunesId} = this.props
const splitTotal = value && value.destinations ? value && value.destinations.reduce((total, d) => total + parseInt(d.split, 10), 0): null

if(value && value.destinations && value.destinations.length > 1 && value.destinations[(value.destinations.length - 1)].name.toLowerCase() === "podcastindex.org") {
Expand Down Expand Up @@ -152,6 +154,16 @@ export default class PodcastHeader extends React.PureComponent<IProps, PodState>
</a>
: ""
}
{itunesId ?
<a
href={`https://episodes.fm/${itunesId}`}
title="Follow in your podcast app"
target="_blank"
>
<img src={EpisodesFMLogo} />
</a>
: ''
}
<a
href={`https://podcastap.com/feed/${id}`}
title="Follow on Activity Pub via Podcast AP"
Expand Down
2 changes: 1 addition & 1 deletion ui/src/components/PodcastHeader/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
flex-direction: row;
flex-wrap: wrap;
justify-content: flex-start;
align-items: flex-start;
align-items: center;
&::-webkit-scrollbar {
visibility: hidden;
}
Expand Down
2 changes: 2 additions & 0 deletions ui/src/pages/Podcast/PodcastInfo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ export default class PodcastInfo extends React.PureComponent<IProps> {
link,
url,
funding,
itunesId,
} = result
const image = getImage(result)
let podcastURL = fixURL(link)
Expand All @@ -196,6 +197,7 @@ export default class PodcastInfo extends React.PureComponent<IProps> {
categories={categories}
value={value}
id={id}
itunesId={itunesId}
podcastURL={podcastURL}
donationPageURL={donationPageURL}
feedURL={feedURL}
Expand Down

0 comments on commit 71e6a89

Please sign in to comment.