private void _manager_NewFile(object sender, DownloadIndex.Entry e) { var i = EntryItem.From(e); RequestUpdateThumbnail(i); ViewModel.Items.Insert(0, i); }
private async void RequestUpdateThumbnail(EntryItem i) { var name = Path.GetFileName($"thumb_{Path.GetFileName(i.FilePath)}.JPG"); var file = await CreateFile(GetTemporaryFolder(), name); await DownloadRequest(file, new DownloadJpeg { Path = i.FilePath, }); i.Thumbnail = new Uri(file.Path); }