public void ExtendQuery(IEnumerable <DisplayableEntry> de) { foreach (var d in de) { d.LoadPreview(_db.FileDownloadStream(EntryHelper.PosePreviewID(d))); } }
public async Task UploadFiles() { IEnumerable <Entry> collection = _dBService.GetAll(); int count = collection.Count(); int ide = 1; foreach (var entry in collection) { if (_stopFlag) { MessageBox.Show("Aborting..."); Reset(); return; } if (entry.Tags.Contains("model")) { OnProgressChanged?.Invoke($"[{ide}/{count}]Skipping"); ide++; continue; } string pvid = EntryHelper.PosePreviewID(entry); Uri pvuri = EntryHelper.PosePreviewUri(entry); using (Stream stream = await GetFileStream(pvuri)) { _dBService.FileUpload(pvid, "pose_0001_thumb.jpg", stream); } OnProgressChanged?.Invoke($"[{ide}/{count}]-PrevImgSaved"); (string Id, string Name, Uri Uri)[] meta = EntryHelper.GetFileMeta(entry);