private static bool getQuality(VideoQuality q)
        {
            if (q.DownloadUrl.Contains("itag=5"))
            {
                q.SetQuality("flv", new Size(320, 240));
            }
            else if (q.DownloadUrl.Contains("itag=6"))
            {
                q.SetQuality("flv", new Size(480, 360));
            }
            else if (q.DownloadUrl.Contains("itag=17"))
            {
                q.SetQuality("mp4", new Size(320, 144));
            }

            else if (q.DownloadUrl.Contains("itag=18"))
            {
                q.SetQuality("mp4", new Size(480, 360));
            }
            else if (q.DownloadUrl.Contains("itag=22"))
            {
                q.SetQuality("mp4", new Size(1280, 720));
            }

            else if (q.DownloadUrl.Contains("itag=34"))
            {
                q.SetQuality("flv", new Size(400, 226));
            }
            else if (q.DownloadUrl.Contains("itag=35"))
            {
                q.SetQuality("flv", new Size(640, 380));
            }
            else if (q.DownloadUrl.Contains("itag=36"))
            {
                q.SetQuality("mp4", new Size(420, 240));
            }
            else if (q.DownloadUrl.Contains("itag=37"))
            {
                q.SetQuality("mp4", new Size(1920, 1280));
            }
            else if (q.DownloadUrl.Contains("itag=38"))
            {
                q.SetQuality("mp4", new Size(4096, 72304));
            }


            else if (q.DownloadUrl.Contains("itag=133"))
            {
                q.SetQuality("webm", new Size(426, 240));
            }
            else if (q.DownloadUrl.Contains("itag=134"))
            {
                q.SetQuality("webm", new Size(640, 360));
            }
            else if (q.DownloadUrl.Contains("itag=135"))
            {
                q.SetQuality("webm", new Size(854, 480));
            }
            else if (q.DownloadUrl.Contains("itag=136"))
            {
                q.SetQuality("webm", new Size(1280, 720));
            }
            else if (q.DownloadUrl.Contains("itag=137"))
            {
                q.SetQuality("webm", new Size(1920, 226));
            }


            else if (q.DownloadUrl.Contains("itag=242"))
            {
                q.SetQuality("mp4", new Size(426, 240));
            }
            else if (q.DownloadUrl.Contains("itag=243"))
            {
                q.SetQuality("mp4", new Size(640, 360));
            }
            else if (q.DownloadUrl.Contains("itag=244"))
            {
                q.SetQuality("mp4", new Size(854, 480));
            }
            else if (q.DownloadUrl.Contains("itag=247"))
            {
                q.SetQuality("mp4", new Size(1280, 720));
            }
            else if (q.DownloadUrl.Contains("itag=248"))
            {
                q.SetQuality("mp4", new Size(1920, 1080));
            }

            else
            {
                return(false);
            }
            return(true);
        }