public async Task Refresh() { LazyLoaded(); using (_busyProvider.DoWork()) { await TryRefreshInternal(); } }
public async Task SaveLocalFile() { using (_busyProvider.DoWork()) { await _fileSystemService.CopyFile(Url, _path); IsClosed = true; _imageSelectionViewModel.IsClosed = true; } }
private async Task LoadImagesInternal() { using (_busyProvider.DoWork()) { AvailableMovieImages images = await _metadataService.FindSetImages(DisplayName); await SetImagePathIfNeeded(images.Fanarts, Fanart); await SetImagePathIfNeeded(images.Posters, Poster); await Refresh(); } }
public async Task Load() { if (!_loaded) { _loaded = true; using (_busyProvider.DoWork()) { await LoadInternal(); } } }
public async Task <IEnumerable <ProgressItem> > FindNewEpisodes() { using (_busyProvider.DoWork()) { await LoadChildren(); List <ProgressItem> items = new List <ProgressItem>(); foreach (ISeasonViewModel season in Children) { items.AddRange(await season.FindNewEpisodes()); } return(items); } }
private async Task AddMovies(IEnumerable <string> movies) { using (_busyProvider.DoWork()) { foreach (string path in movies) { foreach (string file in await FindMovieFiles(path)) { IMovieViewModel newMovie = _viewModelFactory.GetMovie(file); AddMovie(newMovie); newMovie.PropertyChanged += MoviePropertyChanged; } } } }
public void Load() { using (_busyProvider.DoWork()) { IEnumerable <Source> sources = _sourceService.GetSources(_sourceType); // Since we're loading the sources from the repo, don't save them back when adding them in the manager RootFolders.CollectionChanged -= RootFoldersCollectionChanged; SpecificFolders.CollectionChanged -= SpecificFoldersCollectionChanged; LoadFolders(sources); RootFolders.CollectionChanged += RootFoldersCollectionChanged; SpecificFolders.CollectionChanged += SpecificFoldersCollectionChanged; } }
void ILifecycleService.Initialize() { using (_busyProvider.DoWork()) { Sources.Load(); TvShows.CollectionChanged += RefreshNewItems; } }
private async Task UpdateMethod() { using (_busyProvider.DoWork()) { await _metadataService.Update(Path, _artistViewModel.Id); await Refresh(); } }
public async Task Refresh() { using (_busyProvider.DoWork()) { await InitialLoadSeasonImages(); ForceInitialLoadTvShowImages(); } }
public async Task SaveSelectedItem() { using (_busyProvider.DoWork()) { await SaveInternal(SelectedItem); IsClosed = true; } }
public async Task Search() { using (_busyProvider.DoWork()) { IEnumerable <T> items = await SearchInternal(SearchTitle); SetAvailableItems(items); } }
public async Task LoadAvailableImages() { using (_busyProvider.DoWork()) { ImageSelection = new ImageSelectionViewModel(_fileSystemService, _busyProvider, Path, _horizontalAlignement); IEnumerable <Image> images = await _imageStrategy.FindImages(); ImageSelection.SetAvailableItems(images); ImageSelection.PropertyChanged += ImageSelectionPropertyChanged; } }
public override async Task ExecuteAsync(object parameter) { using (_busyProvider.DoWork()) { foreach (ProgressItem item in await _metadataProvider.Update()) { _progressManager.AddItem(item); } await _progressManager.Start(); } }
public async Task Start() { using (_busyProvider.DoWork()) { _collecting = false; foreach (ProgressItem item in Total) { CurrentItem = item; await ExecuteItem(item); } } }
public override async Task ExecuteAsync(object parameter) { using (_busyProvider.DoWork()) { foreach (ITvShowViewModel tvShow in _tvShows) { foreach (ProgressItem item in await tvShow.FindNewEpisodes()) { _progressManager.AddItem(item); } } await _progressManager.Start(); } }