private void DiscoverFile(Lumina.Lumina lumina, string path) { Log.Verbose("discovered file: {FilePath}", path); if (!lumina.FileExists(path)) { return; } Events.EventHelper.DiscoverNewFile(path); }
public MusicPageViewModel(Lumina.Lumina lumina = null) { _lumina = lumina ?? Locator.Current.GetService <Lumina.Lumina>(); _bgms = _lumina.GetExcelSheet <BGM>().GetRows().Where(b => _lumina.FileExists(b.File)).ToList(); _searchResults = this .WhenAnyValue(x => x.SearchFilter) .Throttle(TimeSpan.FromMilliseconds(250)) .Select(filter => filter?.Trim().ToLowerInvariant()) .DistinctUntilChanged() .SelectMany(SearchFilesAsync) .ObserveOn(RxApp.MainThreadScheduler) .ToProperty(this, x => x.SearchResults, SearchFiles()); }