diff --git a/.env.defaults b/.env.defaults index 4896e87d9..757306814 100644 --- a/.env.defaults +++ b/.env.defaults @@ -30,6 +30,7 @@ YRBL_SAD_IMG_URL=https://cdn.lbryplayer.xyz/api/v3/streams/free/yrbl-sad/c2d9649 ENABLE_COMMENT_REACTIONS=true ENABLE_FILE_REACTIONS=false ENABLE_CREATOR_REACTIONS=false +ENABLE_NO_SOURCE_CLAIMS=false CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS=4 # OG diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 72252687e..5507e8670 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -72,6 +72,8 @@ jobs: YRBL_HAPPY_IMG_URL: https://cdn.lbryplayer.xyz/api/v3/streams/free/yrbl-happy/7aa50a7e5adaf48691935d55e45d697547392929/839d9a YRBL_SAD_IMG_URL: https://cdn.lbryplayer.xyz/api/v3/streams/free/yrbl-sad/c2d9649633d974e5ffb503925e1f17d951f1bd0f/f262dd ENABLE_COMMENT_REACTIONS: true + ENABLE_NO_SOURCE_CLAIMS: false + DEFAULT_LANGUAGE: en KNOWN_APP_DOMAINS: lbry.tv,lbry.lat,odysee.com CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS: 0 diff --git a/config.js b/config.js index 77041bdc8..be6d23e47 100644 --- a/config.js +++ b/config.js @@ -35,6 +35,7 @@ const config = { ENABLE_COMMENT_REACTIONS: process.env.ENABLE_COMMENT_REACTIONS === 'true', ENABLE_FILE_REACTIONS: process.env.ENABLE_FILE_REACTIONS === 'true', ENABLE_CREATOR_REACTIONS: process.env.ENABLE_CREATOR_REACTIONS === 'true', + ENABLE_NO_SOURCE_CLAIMS: process.env.ENABLE_NO_SOURCE_CLAIMS === 'true', CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS: process.env.CHANNEL_STAKED_LEVEL_VIDEO_COMMENTS, SIMPLE_SITE: process.env.SIMPLE_SITE === 'true', SHOW_ADS: process.env.SHOW_ADS === 'true', diff --git a/package.json b/package.json index 855c6ada6..48bc18da6 100644 --- a/package.json +++ b/package.json @@ -141,7 +141,7 @@ "imagesloaded": "^4.1.4", "json-loader": "^0.5.4", "lbry-format": "https://github.com/lbryio/lbry-format.git", - "lbry-redux": "lbryio/lbry-redux#d75e7725feb1584937c405ddfda91f0f30ee8749", + "lbry-redux": "lbryio/lbry-redux#629c3273f5a0312c5bdc03c8da718deea7384775", "lbryinc": "lbryio/lbryinc#7faea40d87b78ec91b901c62f501499dc4737025", "lint-staged": "^7.0.2", "localforage": "^1.7.1", diff --git a/ui/component/claimListDiscover/view.jsx b/ui/component/claimListDiscover/view.jsx index 4c36cc690..ea1c8543f 100644 --- a/ui/component/claimListDiscover/view.jsx +++ b/ui/component/claimListDiscover/view.jsx @@ -1,4 +1,5 @@ // @flow +import { ENABLE_NO_SOURCE_CLAIMS } from 'config'; import type { Node } from 'react'; import * as CS from 'constants/claim_search'; import React from 'react'; @@ -199,6 +200,8 @@ function ClaimListDiscover(props: Props) { reposted_claim_id?: string, stream_types?: any, fee_amount?: string, + has_source?: boolean, + has_no_source?: boolean, } = { page_size: dynamicPageSize, page, @@ -219,6 +222,10 @@ function ClaimListDiscover(props: Props) { : CS.ORDER_BY_TOP_VALUE, // Sort by top }; + if (!ENABLE_NO_SOURCE_CLAIMS) { + options.has_source = true; + } + if (feeAmountParam && claimType !== CS.CLAIM_CHANNEL) { options.fee_amount = feeAmountParam; } diff --git a/ui/component/claimTilesDiscover/view.jsx b/ui/component/claimTilesDiscover/view.jsx index 326e4d0e7..af4e6962b 100644 --- a/ui/component/claimTilesDiscover/view.jsx +++ b/ui/component/claimTilesDiscover/view.jsx @@ -1,4 +1,5 @@ // @flow +import { ENABLE_NO_SOURCE_CLAIMS } from 'config'; import React from 'react'; import { createNormalizedClaimSearchKey, MATURE_TAGS } from 'lbry-redux'; import ClaimPreviewTile from 'component/claimPreviewTile'; @@ -74,6 +75,8 @@ function ClaimTilesDiscover(props: Props) { fee_amount?: string, limit_claims_per_channel?: number, stream_types?: Array, + has_source?: boolean, + has_no_source?: boolean, } = { page_size: pageSize, claim_type: claimType || undefined, @@ -88,6 +91,10 @@ function ClaimTilesDiscover(props: Props) { order_by: orderBy || ['trending_group', 'trending_mixed'], }; + if (!ENABLE_NO_SOURCE_CLAIMS) { + options.has_source = true; + } + if (releaseTime) { options.release_time = releaseTime; } diff --git a/yarn.lock b/yarn.lock index 17b42abfc..b9dbdb8de 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6898,9 +6898,9 @@ lazy-val@^1.0.4: yargs "^13.2.2" zstd-codec "^0.1.1" -lbry-redux@lbryio/lbry-redux#d75e7725feb1584937c405ddfda91f0f30ee8749: +lbry-redux@lbryio/lbry-redux#629c3273f5a0312c5bdc03c8da718deea7384775: version "0.0.1" - resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/d75e7725feb1584937c405ddfda91f0f30ee8749" + resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/629c3273f5a0312c5bdc03c8da718deea7384775" dependencies: proxy-polyfill "0.1.6" reselect "^3.0.0"