private void CalculateDownloadLinkIdentifier() { if (string.IsNullOrEmpty(DownloadLink)) { DownloadLinkIdentifier = string.Empty; return; } var splittedByPath = DownloadLink.Split(new[] { @"/" }, StringSplitOptions.RemoveEmptyEntries); var linkIdentifier = splittedByPath.Last(); DownloadLinkIdentifier = linkIdentifier; }
private bool GetId() { try { VideoId = (DownloadLink.Split('/'))[8]; return true; } catch (Exception e) { Console.WriteLine(e.Message); return false; } }