Skip to content

Commit

Permalink
[plat-1055] revert legacy playlist route formatting in embed player t…
Browse files Browse the repository at this point in the history
…o use permalink (#3824)
  • Loading branch information
sabrina-kiam authored Aug 15, 2023
1 parent eb747cf commit 9165c76
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
10 changes: 2 additions & 8 deletions packages/embed/src/components/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -435,15 +435,9 @@ const App = (props) => {

const artworkURL = getArtworkUrl(tracksResponse || collectionsResponse)
const artworkClickURL =
tracksResponse?.permalink ||
`${collectionsResponse?.permalink}-${decodeHashId(
collectionsResponse?.id
)}`
tracksResponse?.permalink || collectionsResponse?.permalink
? stripLeadingSlash(
tracksResponse?.permalink ||
`${collectionsResponse?.permalink}-${decodeHashId(
collectionsResponse?.id
)}`
tracksResponse?.permalink || collectionsResponse?.permalink
)
: null
const listenOnAudiusURL = artworkClickURL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { h } from 'preact'
import { Helmet } from 'react-helmet'

import { getAudiusHostname } from '../../util/getEnv'
import { decodeHashId } from '../../util/hashIds'

const CollectionHelmet = ({ collection }) => {
if (!collection) {
Expand All @@ -12,9 +11,7 @@ const CollectionHelmet = ({ collection }) => {
const title = `${collection.playlistName} by ${collection.user.name} • Audius`
const description = `Listen on Audius: ${collection.playlistName}`
const hostname = getAudiusHostname()
const url = `https://${hostname}${collection.permalink}-${decodeHashId(
collection.id
)}`
const url = `https://${hostname}${collection.permalink}`
const isAlbum = collection.isAlbum
const type = isAlbum ? 'MusicAlbum' : 'MusicPlaylist'
const structuredData = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import 'simplebar/dist/simplebar.min.css'
import IconVerified from '../../assets/img/iconVerified.svg'
import { isBItem } from '../../util/bitems'
import { getArtworkUrl } from '../../util/getArtworkUrl'
import { decodeHashId } from '../../util/hashIds'
import { stripLeadingSlash } from '../../util/stringUtil'
import Artwork from '../artwork/Artwork'
import AudiusLogoButton from '../button/AudiusLogoButton'
Expand Down Expand Up @@ -93,9 +92,7 @@ const CollectionPlayerCard = ({
isTwitter
}) => {
const makeOnTogglePlay = (index) => () => onTogglePlay(index)
const permalink = `${stripLeadingSlash(collection.permalink)}-${decodeHashId(
collection?.id
)}`
const permalink = `${stripLeadingSlash(collection.permalink)}`
return (
<Card
isTwitter={isTwitter}
Expand Down

0 comments on commit 9165c76

Please sign in to comment.