VideoLibrary.YouTubeVideo.YouTubeVideo C# (CSharp) Method

YouTubeVideo() private method

private YouTubeVideo ( string title, UnscrambledQuery query, string jsPlayer, bool manifestExist = false ) : System
title string
query UnscrambledQuery
jsPlayer string
manifestExist bool
return System
        internal YouTubeVideo(string title, 
            UnscrambledQuery query, string jsPlayer, bool manifestExist = false)
        {
            this.Title = title;
            this.uri = query.Uri;
            this.jsPlayer = jsPlayer;
            this.encrypted = query.IsEncrypted;
            if (manifestExist)
            {
                // Link contain "key/value"
                // separated by slash
                string x = uri.Substring(uri.IndexOf("itag/") + 5, 3);
                x = x.TrimEnd('/'); // In case format is 2-digit
                this.FormatCode = int.Parse(x);
            }
            else this.FormatCode = int.Parse(new Query(uri)["itag"]);
        }