mirror of
https://github.com/jeffvli/feishin.git
synced 2026-08-08 05:12:57 +02:00
autodj fixes and enhancements (#2271)
- add setting to allow duplicates - add setting to only prefer similar sogs - fix autodj algorithm to match by the priority order instead of incorrectly grouping when limit not reached
This commit is contained in:
@@ -15,6 +15,7 @@ import {
|
||||
import { NumberInput } from '/@/shared/components/number-input/number-input';
|
||||
import { SegmentedControl } from '/@/shared/components/segmented-control/segmented-control';
|
||||
import { Select } from '/@/shared/components/select/select';
|
||||
import { Switch } from '/@/shared/components/switch/switch';
|
||||
|
||||
export const AutoDJSettings = memo(() => {
|
||||
const { t } = useTranslation();
|
||||
@@ -145,6 +146,40 @@ export const AutoDJSettings = memo(() => {
|
||||
}),
|
||||
title: t('setting.autoDJ_timing'),
|
||||
},
|
||||
{
|
||||
control: (
|
||||
<Switch
|
||||
aria-label={t('setting.autoDJ_allowDuplicates')}
|
||||
checked={settings.allowDuplicates}
|
||||
onChange={(e) => {
|
||||
setSettings({
|
||||
autoDJ: {
|
||||
allowDuplicates: e.currentTarget.checked,
|
||||
},
|
||||
});
|
||||
}}
|
||||
/>
|
||||
),
|
||||
description: t('setting.autoDJ_allowDuplicates_description'),
|
||||
title: t('setting.autoDJ_allowDuplicates'),
|
||||
},
|
||||
{
|
||||
control: (
|
||||
<Switch
|
||||
aria-label={t('setting.autoDJ_onlySimilar')}
|
||||
checked={settings.onlySimilar}
|
||||
onChange={(e) => {
|
||||
setSettings({
|
||||
autoDJ: {
|
||||
onlySimilar: e.currentTarget.checked,
|
||||
},
|
||||
});
|
||||
}}
|
||||
/>
|
||||
),
|
||||
description: t('setting.autoDJ_onlySimilar_description'),
|
||||
title: t('setting.autoDJ_onlySimilar'),
|
||||
},
|
||||
];
|
||||
|
||||
return <SettingsSection options={autoDJOptions} title={t('setting.autoDJ')} />;
|
||||
|
||||
Reference in New Issue
Block a user