perf(smart-playlist): suggest rule values for what was typed
The rule editor's value box built its suggestions from libraryStore's whole-library arrays, which made it one more reason to load every track at startup, and left it empty when they had not loaded. SuggestSmartPlaylistValues answers with up to 50 distinct values of a field that contain the typed text, from the same joined row the rules match against, so a suggestion is always something a rule can match. yj-combobox announces its filter text so the editor can ask, debounced and cached per field and text. Refs #279
This commit is contained in:
1 parent
3f23bb4396
commit
3cddf70c4d
7 files changed
+356
-49
No files matched your search
@@ -309,6 +309,14 @@ export function SearchLibrary(query: string): $CancellablePromise<$models.Candid
|
||||
return $Call.ByID(3912116995, query);
|
||||
}
|
||||
|
||||
/**
|
||||
* SuggestSmartPlaylistValues returns values of field present in the
|
||||
* library that contain needle, for the rule editor's value box.
|
||||
*/
|
||||
export function SuggestSmartPlaylistValues(field: string, needle: string): $CancellablePromise<string[] | null> {
|
||||
return $Call.ByID(3718198115, field, needle);
|
||||
}
|
||||
|
||||
/**
|
||||
* ToggleDefaultPlaylistTrack adds or removes a single track
|
||||
* from the default playlist. Returns true if the track is now
|
||||
|
||||
Reference in new issue
Block a user