From 8feb22bf3517625f0c8e83bd4786829e119a313f Mon Sep 17 00:00:00 2001 From: Reed <3893871+dharit-tan@users.noreply.github.com> Date: Mon, 22 Apr 2024 16:25:32 -0400 Subject: [PATCH] [PAY-2656] Filter out premium albums from feed if FF off (#8181) --- packages/web/src/common/store/lineup/sagas.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/web/src/common/store/lineup/sagas.ts b/packages/web/src/common/store/lineup/sagas.ts index bb0640e5b98..964684d5a82 100644 --- a/packages/web/src/common/store/lineup/sagas.ts +++ b/packages/web/src/common/store/lineup/sagas.ts @@ -74,6 +74,9 @@ function* filterDeletes( const isUSDCGatedContentEnabled = getFeatureEnabled( FeatureFlags.USDC_PURCHASES ) + const isPremiumAlbumsEnabled = getFeatureEnabled( + FeatureFlags.PREMIUM_ALBUMS_ENABLED + ) const deniedHandles = remoteConfig .getRemoteVar(StringKeys.EXPLORE_PREMIUM_DENIED_USERS) @@ -100,6 +103,14 @@ function* filterDeletes( return null } + if ( + !isPremiumAlbumsEnabled && + 'playlist_id' in metadata && + metadata.is_stream_gated + ) { + return null + } + // Filter out known test accounts from premium explore page. if ( lineupPrefix === premiumTracksPageLineupActions.prefix &&