add ENABLE_NO_SOURCE_CLAIMS to config

this sets has_source:true if the variable is true to non-odysee apps won't be shown livestream claims
This commit is contained in:
Sean Yesmunt 2021-03-18 11:41:21 -04:00
parent 0eaa5dadcf
commit e967f2e1ad
7 changed files with 21 additions and 3 deletions

View file

@ -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

View file

@ -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

View file

@ -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',

View file

@ -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",

View file

@ -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;
}

View file

@ -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<string>,
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;
}

View file

@ -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"