Skip to content

Commit

Permalink
Always include user signature for stream (#3114)
Browse files Browse the repository at this point in the history
  • Loading branch information
raymondjacobson authored Mar 28, 2023
1 parent b90eaf6 commit 36909d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions packages/mobile/src/components/audio/Audio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -277,15 +277,11 @@ export const Audio = () => {
if (!track) {
continue
}
const {
track_id: trackId,
is_premium: isPremium,
premium_content_signature
} = track
const { track_id: trackId, premium_content_signature } = track

if (gatedQueryParamsMap[trackId]) {
queryParamsMap[trackId] = gatedQueryParamsMap[trackId]
} else if (isGatedContentEnabled && isPremium) {
} else if (isGatedContentEnabled) {
const data = `Premium content user signature at ${Date.now()}`
const signature = await audiusBackendInstance.getSignature(data)
const premiumContentSignature =
Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/common/store/player/sagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export function* watchPlay() {
streamMp3IsEnabled ||
(encodedTrackId && FORCE_MP3_STREAM_TRACK_IDS.has(encodedTrackId))
let queryParams: QueryParams = {}
if (isGatedContentEnabled && track.is_premium) {
if (isGatedContentEnabled) {
const data = `Premium content user signature at ${Date.now()}`
const signature = yield* call(audiusBackendInstance.getSignature, data)
const premiumTrackSignatureMap = yield* select(
Expand Down

0 comments on commit 36909d1

Please sign in to comment.