public async Task <INodeExtendedInfo> GetNodeExtended(string id) { var item = await GetItem(id).Request().GetAsync().ConfigureAwait(false); var info = new CloudDokanNetItemInfo { WebLink = item.WebUrl, CanShareReadOnly = true, CanShareReadWrite = true, Id = item.Id }; return(info); }
async Task <INodeExtendedInfo> IHttpCloudNodes.GetNodeExtended(string id) { try { var node = await amazon.Nodes.GetNodeExtended(id); var info = new CloudDokanNetItemInfo { Id = id, TempLink = node.tempLink, Assets = node.assets?.Select(i => new CloudDokanNetAssetInfo { Id = i.id, TempLink = i.tempLink }).ToList() }; if (node.kind == AmazonNodeKind.FOLDER) { info.WebLink = "https://www.amazon.com/clouddrive/folder/" + id; } if (node.video != null) { info.Video = new CloudDokanNetAssetInfoImage { Width = node.video.width, Height = node.video.height }; } if (node.image != null) { info.Image = new CloudDokanNetAssetInfoImage { Width = node.image.width, Height = node.image.height }; } return(info); } catch (Exception ex) { throw ProcessException(ex); } }