mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-08 04:50:12 +02:00
add player filters to omit songs from queue based on criteria
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import i18n from 'i18next';
|
||||
import { z } from 'zod';
|
||||
|
||||
export enum NDAlbumArtistListSort {
|
||||
@@ -180,45 +181,126 @@ export const NDSongQueryFields = [
|
||||
];
|
||||
|
||||
export const NDSongQueryPlaylistOperators = [
|
||||
{ label: 'is in', value: 'inPlaylist' },
|
||||
{ label: 'is not in', value: 'notInPlaylist' },
|
||||
{
|
||||
label: i18n.t('filterOperator.inPlaylist', { postProcess: 'titleCase' }),
|
||||
value: 'inPlaylist',
|
||||
},
|
||||
{
|
||||
label: i18n.t('filterOperator.notInPlaylist', { postProcess: 'titleCase' }),
|
||||
value: 'notInPlaylist',
|
||||
},
|
||||
];
|
||||
|
||||
export const NDSongQueryDateOperators = [
|
||||
{ label: 'is', value: 'is' },
|
||||
{ label: 'is not', value: 'isNot' },
|
||||
{ label: 'is before', value: 'before' },
|
||||
{ label: 'is after', value: 'after' },
|
||||
{ label: 'is in the last', value: 'inTheLast' },
|
||||
{ label: 'is not in the last', value: 'notInTheLast' },
|
||||
{ label: 'is in the range', value: 'inTheRange' },
|
||||
{ label: 'is before (date)', value: 'beforeDate' },
|
||||
{ label: 'is after (date)', value: 'afterDate' },
|
||||
{ label: 'is in the range (date)', value: 'inTheRangeDate' },
|
||||
{
|
||||
label: i18n.t('filterOperator.is', { postProcess: 'titleCase' }),
|
||||
value: 'is',
|
||||
},
|
||||
{
|
||||
label: i18n.t('filterOperator.isNot', { postProcess: 'titleCase' }),
|
||||
value: 'isNot',
|
||||
},
|
||||
{
|
||||
label: i18n.t('filterOperator.before', { postProcess: 'titleCase' }),
|
||||
value: 'before',
|
||||
},
|
||||
{
|
||||
label: i18n.t('filterOperator.after', { postProcess: 'titleCase' }),
|
||||
value: 'after',
|
||||
},
|
||||
{
|
||||
label: i18n.t('filterOperator.inTheLast', { postProcess: 'titleCase' }),
|
||||
value: 'inTheLast',
|
||||
},
|
||||
{
|
||||
label: i18n.t('filterOperator.notInTheLast', { postProcess: 'titleCase' }),
|
||||
value: 'notInTheLast',
|
||||
},
|
||||
{
|
||||
label: i18n.t('filterOperator.inTheRange', { postProcess: 'titleCase' }),
|
||||
value: 'inTheRange',
|
||||
},
|
||||
{
|
||||
label: i18n.t('filterOperator.beforeDate', { postProcess: 'titleCase' }),
|
||||
value: 'beforeDate',
|
||||
},
|
||||
{
|
||||
label: i18n.t('filterOperator.afterDate', { postProcess: 'titleCase' }),
|
||||
value: 'afterDate',
|
||||
},
|
||||
{
|
||||
label: i18n.t('filterOperator.inTheRangeDate', { postProcess: 'titleCase' }),
|
||||
value: 'inTheRangeDate',
|
||||
},
|
||||
];
|
||||
|
||||
export const NDSongQueryStringOperators = [
|
||||
{ label: 'is', value: 'is' },
|
||||
{ label: 'is not', value: 'isNot' },
|
||||
{ label: 'contains', value: 'contains' },
|
||||
{ label: 'does not contain', value: 'notContains' },
|
||||
{ label: 'starts with', value: 'startsWith' },
|
||||
{ label: 'ends with', value: 'endsWith' },
|
||||
{
|
||||
label: i18n.t('filterOperator.is', { postProcess: 'titleCase' }),
|
||||
value: 'is',
|
||||
},
|
||||
{
|
||||
label: i18n.t('filterOperator.isNot', { postProcess: 'titleCase' }),
|
||||
value: 'isNot',
|
||||
},
|
||||
{
|
||||
label: i18n.t('filterOperator.contains', { postProcess: 'titleCase' }),
|
||||
value: 'contains',
|
||||
},
|
||||
{
|
||||
label: i18n.t('filterOperator.notContains', { postProcess: 'titleCase' }),
|
||||
value: 'notContains',
|
||||
},
|
||||
{
|
||||
label: i18n.t('filterOperator.startsWith', { postProcess: 'titleCase' }),
|
||||
value: 'startsWith',
|
||||
},
|
||||
{
|
||||
label: i18n.t('filterOperator.endsWith', { postProcess: 'titleCase' }),
|
||||
value: 'endsWith',
|
||||
},
|
||||
];
|
||||
|
||||
export const NDSongQueryBooleanOperators = [
|
||||
{ label: 'is', value: 'is' },
|
||||
{ label: 'is not', value: 'isNot' },
|
||||
{
|
||||
label: i18n.t('filterOperator.is', { postProcess: 'titleCase' }),
|
||||
value: 'is',
|
||||
},
|
||||
{
|
||||
label: i18n.t('filterOperator.isNot', { postProcess: 'titleCase' }),
|
||||
value: 'isNot',
|
||||
},
|
||||
];
|
||||
|
||||
export const NDSongQueryNumberOperators = [
|
||||
{ label: 'is', value: 'is' },
|
||||
{ label: 'is not', value: 'isNot' },
|
||||
{ label: 'contains', value: 'contains' },
|
||||
{ label: 'does not contain', value: 'notContains' },
|
||||
{ label: 'is greater than', value: 'gt' },
|
||||
{ label: 'is less than', value: 'lt' },
|
||||
{ label: 'is in the range', value: 'inTheRange' },
|
||||
{
|
||||
label: i18n.t('filterOperator.is', { postProcess: 'titleCase' }),
|
||||
value: 'is',
|
||||
},
|
||||
{
|
||||
label: i18n.t('filterOperator.isNot', { postProcess: 'titleCase' }),
|
||||
value: 'isNot',
|
||||
},
|
||||
{
|
||||
label: i18n.t('filterOperator.contains', { postProcess: 'titleCase' }),
|
||||
value: 'contains',
|
||||
},
|
||||
{
|
||||
label: i18n.t('filterOperator.notContains', { postProcess: 'titleCase' }),
|
||||
value: 'notContains',
|
||||
},
|
||||
{
|
||||
label: i18n.t('filterOperator.isGreaterThan', { postProcess: 'titleCase' }),
|
||||
value: 'gt',
|
||||
},
|
||||
{
|
||||
label: i18n.t('filterOperator.isLessThan', { postProcess: 'titleCase' }),
|
||||
value: 'lt',
|
||||
},
|
||||
{
|
||||
label: i18n.t('filterOperator.inTheRange', { postProcess: 'titleCase' }),
|
||||
value: 'inTheRange',
|
||||
},
|
||||
];
|
||||
|
||||
export enum NDUserListSort {
|
||||
|
||||
Reference in New Issue
Block a user