add medium duration video filter

This commit is contained in:
zeppi 2022-03-07 15:19:10 -05:00 committed by jessopb
parent 64e48c1eef
commit 2ddf0a2cbd
4 changed files with 9 additions and 3 deletions

View file

@ -2291,5 +2291,7 @@
"Choose View Hosting Limit": "Choose View Hosting Limit",
"View Hosting Limit (GB)": "View Hosting Limit (GB)",
"%free% of %total% available": "%free% of %total% available",
"Short (< 4 min)": "Short (< 4 min)",
"Medium (4 - 20 min)": "Medium (4 - 20 min)",
"--end--": "--end--"
}

View file

@ -253,7 +253,7 @@ function ClaimListDiscover(props: Props) {
release_time?: string,
claim_type?: string | Array<string>,
name?: string,
duration?: string,
duration?: string | Array<string>,
reposted_claim_id?: string,
stream_types?: any,
fee_amount?: string,
@ -345,6 +345,8 @@ function ClaimListDiscover(props: Props) {
options.duration = '<=240';
} else if (durationParam === CS.DURATION_LONG) {
options.duration = '>=1200';
} else if (durationParam === CS.DURATION_MEDIUM) {
options.duration = ['<=1200', '>=240'];
}
}

View file

@ -424,7 +424,8 @@ function ClaimListHeader(props: Props) {
{CS.DURATION_TYPES.map((dur) => (
<option key={dur} value={dur}>
{/* i18fixme */}
{dur === CS.DURATION_SHORT && __('Short (< 4 minutes)')}
{dur === CS.DURATION_SHORT && __('Short (< 4 min)')}
{dur === CS.DURATION_MEDIUM && __('Medium (4 - 20 min)')}
{dur === CS.DURATION_LONG && __('Long (> 20 min)')}
{dur === CS.DURATION_ALL && __('Any')}
</option>

View file

@ -36,9 +36,10 @@ export const ORDER_BY_NEW_VALUE = ['release_time'];
export const ORDER_BY_TYPES = [ORDER_BY_TRENDING, ORDER_BY_NEW, ORDER_BY_TOP];
export const DURATION_SHORT = 'short';
export const DURATION_MEDIUM = 'medium';
export const DURATION_LONG = 'long';
export const DURATION_ALL = 'all';
export const DURATION_TYPES = [DURATION_ALL, DURATION_SHORT, DURATION_LONG];
export const DURATION_TYPES = [DURATION_ALL, DURATION_SHORT, DURATION_MEDIUM, DURATION_LONG];
export const SORT_BY = {
// key: Enumeration; can be anything as long as unique. Also used as URLParam.