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:
@@ -461,9 +461,11 @@ const ENV_SETTING_SPECS: EnvSettingSpec[] = [
|
||||
path: ['autoDJ', 'albumStrategy'],
|
||||
type: 'enum',
|
||||
},
|
||||
{ key: 'FS_AUTO_DJ_ALLOW_DUPLICATES', path: ['autoDJ', 'allowDuplicates'], type: 'bool' },
|
||||
{ key: 'FS_AUTO_DJ_ENABLED', path: ['autoDJ', 'enabled'], type: 'bool' },
|
||||
{ key: 'FS_AUTO_DJ_ITEM_COUNT', path: ['autoDJ', 'itemCount'], type: 'num' },
|
||||
{ enumSet: AUTO_DJ_MODES, key: 'FS_AUTO_DJ_MODE', path: ['autoDJ', 'mode'], type: 'enum' },
|
||||
{ key: 'FS_AUTO_DJ_ONLY_SIMILAR', path: ['autoDJ', 'onlySimilar'], type: 'bool' },
|
||||
{
|
||||
enumSet: AUTO_DJ_STRATEGIES,
|
||||
key: 'FS_AUTO_DJ_SONG_STRATEGY',
|
||||
|
||||
@@ -746,9 +746,11 @@ const autoDjStrategyEnum = z.enum(['similar', 'library_random']);
|
||||
|
||||
const AutoDJSettingsSchema = z.object({
|
||||
albumStrategy: autoDjStrategyEnum,
|
||||
allowDuplicates: z.boolean(),
|
||||
enabled: z.boolean(),
|
||||
itemCount: z.number(),
|
||||
mode: z.enum(['songs', 'albums']),
|
||||
onlySimilar: z.boolean(),
|
||||
songStrategy: autoDjStrategyEnum,
|
||||
timing: z.number(),
|
||||
});
|
||||
@@ -1219,9 +1221,11 @@ const platformDefaultWindowBarStyle: Platform = getPlatformDefaultWindowBarStyle
|
||||
const initialState: SettingsState = {
|
||||
autoDJ: {
|
||||
albumStrategy: AUTO_DJ_STRATEGY.SIMILAR,
|
||||
allowDuplicates: false,
|
||||
enabled: false,
|
||||
itemCount: 5,
|
||||
mode: 'songs',
|
||||
onlySimilar: false,
|
||||
songStrategy: AUTO_DJ_STRATEGY.SIMILAR,
|
||||
timing: 1,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user