コード例 #1
0
        /// <summary>
        /// Load netflix table partial view
        /// </summary>
        /// <param name="ordering"></param>
        /// <returns></returns>
        public IActionResult NetflixTable(bool ordering)
        {
            Netflix        n    = new Netflix();
            List <Netflix> info = n.GetNetflixISPs(ordering, HomeController._database);

            return(PartialView(info));
        }
コード例 #2
0
        public void CanParseNetflexFeed()
        {
            var rss  = @"<?xml version=""1.0"" encoding=""UTF-8"" standalone=""yes""?>
				<rss version=""2.0"">
				  <channel >
					<title>Netflix Top 100</title>
					<description>Top 100 Netflix movies, published every 2 weeks.</description>
					<item>
					  <title>The Imitation Game</title>
					  <link>http://dvd.netflix.com/Movie/The-Imitation-Game/70295172</link>
					  <description>&lt;a href=&quot;http://dvd.netflix.com/Movie/The-Imitation-Game/70295172&quot;&gt;&lt;img src=&quot;http://cdn-0.nflximg.com/us/boxshots/small/70295172.jpg&quot;/&gt;&lt;/a&gt;&lt;br&gt;Chronicling mathematical wizard Alan Turing's key role in Britain's successful effort to crack Germany's Enigma code during World War II, this historical biopic also recounts how his groundbreaking work helped launch the computer age.</description>
					</item>
					<item>
					  <title>Game of Thrones</title>
					  <link>http://dvd.netflix.com/Movie/Game-of-Thrones/70177064</link>
					  <description>&lt;a href=&quot;http://dvd.netflix.com/Movie/Game-of-Thrones/70177064&quot;&gt;&lt;img src=&quot;http://cdn-0.nflximg.com/us/boxshots/small/70177064.jpg&quot;/&gt;&lt;/a&gt;&lt;br&gt;Originally airing on HBO, this live-action fantasy series -- based on George R.R. Martin's &quot;A Song of Ice and Fire&quot; novels -- charts the violent efforts of competing noble families to gain control of the vacant Westeros throne.</description>
					</item>
				  </channel>
				</rss>"                ;
            var feed = Netflix.parseTop100(rss);

            Assert.AreEqual(2, feed.Count());

            var first = feed.First();

            Assert.AreEqual("The Imitation Game", first.Title);
            Assert.AreEqual(
                "http://cdn-0.nflximg.com/us/boxshots/small/70295172.jpg",
                first.Thumbnail.Value);
        }
コード例 #3
0
        private async void SetupNetflix(Netflix _netflix)
        {
            //await _netflix.LoadNetflixProfiles();
            var stream = await _netflix.Profiles.active.GetAvatarImageStream(AvatarSizes.Size64);

            profilesDropDown.Image = Image.FromStream(stream);
            activeUser.Text        = _netflix.Profiles.active.firstName;

            Task.Run(() => LoadHistory());

            foreach (Profile prof in _netflix.Profiles.profiles)
            {
                if (prof.rawFirstName == "Kids")
                {
                    continue;
                }

                var task = prof.GetAvatarImageStream(AvatarSizes.Size64);

                ToolStripItem dropItem = null;
                Invoke(new MethodInvoker(delegate { dropItem = profilesDropDown.DropDownItems.Add(prof.firstName); }));
                Invoke(new MethodInvoker(async delegate { dropItem.Image = Image.FromStream(await task); }));

                dropItem.Click += DropItem_Click;
            }

            //_netflix.GetHomePageList();
        }
コード例 #4
0
        static void Main(string[] args)
        {
            IReproductores DVD     = new DVD(0, "DVD1");
            IReproductores VHS     = new VHS(1, "VHS1");
            IReproductores Netflix = new Netflix(3, "Netflix1");

            ICRUD <IReproductores> ListaReproductores = new CRUD();

            ListaReproductores.insertar(DVD);
            ListaReproductores.insertar(VHS);
            ListaReproductores.insertar(Netflix);

            ListaReproductores.buscar(0).play();
            ListaReproductores.buscar(0).fw();
            ListaReproductores.buscar(0).rw();
            ListaReproductores.buscar(0).stop();

            ListaReproductores.buscar(1).play();
            ListaReproductores.buscar(1).fw();
            ListaReproductores.buscar(1).rw();
            ListaReproductores.buscar(1).stop();

            ListaReproductores.buscar(2).play();
            ListaReproductores.buscar(2).fw();
            ListaReproductores.buscar(2).rw();
            ListaReproductores.buscar(2).stop();

            ListaReproductores.eliminar(0);

            ListaReproductores.eliminar(0);

            ListaReproductores.eliminar(0);


            IReproductores DVD1     = new DVD(0, "DVD2");
            IReproductores VHS1     = new VHS(1, "VHS2");
            IReproductores Netflix1 = new Netflix(3, "Netflix2");

            ListaReproductores.insertar(DVD1);
            ListaReproductores.insertar(VHS1);
            ListaReproductores.insertar(Netflix1);

            ListaReproductores.buscar(0).play();
            ListaReproductores.buscar(0).fw();
            ListaReproductores.buscar(0).rw();
            ListaReproductores.buscar(0).stop();

            ListaReproductores.buscar(1).play();
            ListaReproductores.buscar(1).fw();
            ListaReproductores.buscar(1).rw();
            ListaReproductores.buscar(1).stop();

            ListaReproductores.buscar(2).play();
            ListaReproductores.buscar(2).fw();
            ListaReproductores.buscar(2).rw();
            ListaReproductores.buscar(2).stop();

            Console.ReadKey();
        }
コード例 #5
0
 public NetflixIndexViewModel(IEnumerable <Models.Netflix> listAll)
 {
     NetflixList = listAll.Select(n => new SelectListItem()
     {
         Text = n.Title
     });
     allList = listAll.OrderByDescending(la => la.Title).FirstOrDefault();
 }
コード例 #6
0
    private void subscribeToNetflixButton_Click(object sender, RoutedEventArgs e)
    {
        Netflix  netflix       = new Netflix("Stir Crazy");
        Observer subscriberOne = new Observer();

        netflix.AddObserver(subscriberOne);
        myList.Add("Netflix");
        listBox.Items.AddRange(myList.ToArray());    //This line should be changed
    }
コード例 #7
0
ファイル: Global.asax.cs プロジェクト: donomans/FilmTrove
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

            WebApiConfig.Register(GlobalConfiguration.Configuration);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
            AuthConfig.RegisterAuth();

            Netflix.Login.SetCredentials(
                "7qf3845qydavuucmhj96b6hd",
                "5jYe5FVhhF",
                "FilmTrove");

            Netflix.SetMethodForGettingCurrentUserAccount(FilmTrove.Models.NetflixAccount.GetCurrentUserNetflixUserInfo);
        }
コード例 #8
0
        static void Main(string[] args)
        {
            int Multiply(int numOne, int numTwo)
            {
                return(numOne * numTwo);
            }

            Console.WriteLine(Multiply(5, 2));

            string FullName(string firstName, string lastName)
            {
                return($"{firstName} {lastName}");
            }

            Console.WriteLine(FullName("Ginny", "Munson"));

            Netflix newShow      = new Netflix();
            Netflix newShowTwo   = new Netflix();
            Netflix newShowThree = new Netflix();

            newShow.Name   = "The Crown";
            newShow.Rating = 5;
            newShow.Genre  = "Historical Drama";

            newShowTwo.Name   = "Arrow";
            newShowTwo.Rating = 3;
            newShowTwo.Genre  = "Superhero Drama";

            newShowThree.Name   = "The Office";
            newShowThree.Rating = 5;
            newShowThree.Genre  = "Comedy";



            Console.WriteLine(newShowTwo.getSuggestion());
        }
コード例 #9
0
ファイル: FilmFacadeTests.cs プロジェクト: Arlencho/Tenta
 public void Test_That_Netflix_Can_Be_Played()
 {
     MovieFacade facade = new MovieFacade();
     IPlayer netflixMovie = new Netflix();
     netflixMovie.PlayMovie("Starwars Is being play now");
 }
コード例 #10
0
        public static void Main(string[] args)
        {
            #region Intro

            Console.ForegroundColor = Color.White;

            Logger.Inf("Select your proxies list.", true, false);

            var fileDialog = new OpenFileDialog
            {
                Filter = "Text Files|*.txt",
                Title  = "Select your proxies list"
            };

            while (fileDialog.ShowDialog() != DialogResult.OK)
            {
            }

            var fileName  = fileDialog.FileName;
            var proxyList = FileHelper.ReadAsList(fileDialog.FileName);

            Logger.Inf($"{proxyList.Count} proxies loaded from {Path.GetFileName(fileName)}", true);

            Logger.Inf("Select your code list.", true, false);

            fileDialog.Title = "Select your code list";

            while (fileDialog.ShowDialog() != DialogResult.OK)
            {
            }

            fileName = fileDialog.FileName;
            var codeList = FileHelper.ReadAsList(fileDialog.FileName);

            Logger.Inf($"{codeList.Count} codes loaded from {Path.GetFileName(fileName)}", true);

            var proxyTypes = new[] { "HTTP", "SOCKS4", "SOCKS5" };
            var proxyType  = string.Empty;

            while (string.IsNullOrEmpty(proxyType))
            {
                Logger.Inf($"Proxy Type [{string.Join(", ", proxyTypes)}] : ", newLine: false);

                var input = Console.ReadLine();

                if (proxyTypes.Contains(input))
                {
                    proxyType = input;
                }
            }

            var maxThreads = -1;

            while (maxThreads < 0)
            {
                Logger.Inf("Max Threads : ", newLine: false);

                try
                {
                    var input = Console.ReadLine();

                    if (string.IsNullOrEmpty(input))
                    {
                        continue;
                    }

                    maxThreads = int.Parse(input);
                }
                catch (FormatException)
                {
                    // ignored
                }
            }

            #endregion

            var caller = new Netflix
            {
                ProxyList = proxyList.ToArray(),
                ProxyType = proxyType,
            };

            Console.Clear();

            ThreadPool.SetMinThreads(maxThreads, maxThreads);

            int checkedCount = 0, errorCount = 0, bannedCount = 0, validCount = 0, totalBalance = 0;

            FileHelper.BeginCheck();
            CpmTask.Start();
            Globals.Working = true;

            Parallel.ForEach(Partitioner.Create(codeList, EnumerablePartitionerOptions.NoBuffering),
                             new ParallelOptions {
                MaxDegreeOfParallelism = maxThreads
            }, code =>
            {
                caller.Check(code, (codeCb, proxy, valid, error, balance) =>
                {
                    if (new[] { "generic_failure", "unable_to_redeem", "Unable to determine balance", "Proxy timed out" }.Contains(error))
                    {
                        errorCount += 1;
                    }

                    if (error.Contains("Banned proxy"))
                    {
                        bannedCount += 1;
                    }

                    if (valid && !string.IsNullOrEmpty(balance))
                    {
                        checkedCount  += 1;
                        validCount    += 1;
                        var rawBalance = int.Parse(new Regex("(\\d{1,3})").Match(balance).Groups[1].Value);
                        totalBalance  += rawBalance;

                        FileHelper.Write("Hits.txt", $"{code} | €{rawBalance}");

                        Console.WriteLine($"{code} | {rawBalance} EUR", Color.Green);
                    }
                    else if (error.Contains("single_use_code"))
                    {
                        checkedCount += 1;
                    }

                    Interlocked.Increment(ref Globals.LastChecks);

                    Console.Title =
                        $"NGC – Checked : {checkedCount}/{codeList.Count} – Errors : {errorCount} – Bans : {bannedCount} – Hits : {validCount} – Total: {totalBalance} EUR – CPM: {CpmTask.GetCpm()}";
                });
            });

            Logger.Inf("Job done.");
            Thread.Sleep(-1);
        }
コード例 #11
0
        static void Main(string[] args)
        {
            string str, choice, ch, sec, mode;
            int    age, sp;

            Console.WriteLine("----WELCOME TO OTT PLATFORMS PAGE----");
            Console.WriteLine("Enter your user-name");
            str = Console.ReadLine();
            Console.WriteLine("Enter your age");
            age = Convert.ToInt32(Console.ReadLine());
            int     amt;
            payment pay = new payment(str);
            bill    b1  = new bill(pay.bill);

            Console.WriteLine("Choose your choice of platform: \nNETFLIX(select \'1\') \nAMAZON(select \'2\')");
            int opt = Convert.ToInt32(Console.ReadLine());

            switch (opt)
            {
            case 1:

                Netflix    ott1     = new Netflix(str, age);
                showList   sh1      = new showList();
                manageProf names_Nf = new manageProf();
                names_Nf[0] = "Dhinesh--0";
                names_Nf[1] = "Abinand--1";
                names_Nf[2] = "kalpana --2";
                names_Nf[3] = "ram --3";
                Console.WriteLine("user name-----> " + ott1.name);
                Console.WriteLine("user age-----> " + ott1.age);
                Console.WriteLine("choose login-page or sign-up page(IF U DON'T HAVE A ACCOUNT)");
                choice = Console.ReadLine();
                if (choice == "login")
                {
                    ott1.login();
                    Console.WriteLine("The index of your account profiles:");
                    for (int i = 0; i < manageProf.size; i++)
                    {
                        Console.WriteLine(names_Nf[i]);
                    }
                    Console.WriteLine("Select your profile index");
                    sp = Convert.ToInt16(Console.ReadLine());
                }
                else if (choice == "sign-up")
                {
                    //ott1.signup ();
                    //Console.WriteLine ("\n");
                    //ott1.plans ();
                    //Console.WriteLine ("\n");
                    // ott1.login ();
                    ott1.threadrun();
                    amt  = ott1.plans();
                    mode = ott1.paymentOptions(amt);
                    b1("NETFLIX", amt, mode);
                }
                Console.WriteLine("SELECT THE -- MOVIES SECTION OR SERIES SECTION --");
                sec = Console.ReadLine();
                if (sec == "series")
                {
                    Console.WriteLine("==============================");
                    sh1.shows_Nf();
                    Console.WriteLine("==============================");
                    Console.WriteLine("\n");
                    Console.WriteLine("if you want to: \nsearch any show (PRESS 1) \nfind genre and filter based on rating(PRESS 2) \nExit (PRESS 3)");
                    ch = Console.ReadLine();
                    if (ch == "1")
                    {
                        sh1.search_Nf_shows();
                    }
                    else if (ch == "2")
                    {
                        sh1.select_Nf_genre();
                    }
                    else
                    {
                        break;
                    }
                }
                else if (sec == "movies")
                {
                    Console.WriteLine("==============================");
                    sh1.movies_Nf();
                    Console.WriteLine("==============================");
                    Console.WriteLine("\n");
                    Console.WriteLine("if you want to: \nSearch any show (PRESS 1) \n\tSelect genre and filter based on rating(PRESS 2) \n\t\tExit (PRESS 3)");
                    ch = Console.ReadLine();
                    if (ch == "1")
                    {
                        sh1.search_Nf_movies();
                    }
                    else if (ch == "2")
                    {
                        sh1.select_Nf_movie_genre();
                    }
                    else
                    {
                        break;
                    }
                }

                break;

            case 2:
                AmazonPrime ott2 = new AmazonPrime();
                ott2.a_name = str;
                ott2.a_age  = age;
                showList   sh2      = new showList();
                manageProf names_Ap = new manageProf();
                names_Ap[0] = "Dhinesh--0";
                names_Ap[1] = "Abinand--1";
                names_Ap[2] = "kalpana --2";
                names_Ap[3] = "ram --3";

                Console.WriteLine("user name-----> " + ott2.a_name);
                Console.WriteLine("user age-----> " + ott2.a_age);
                Console.WriteLine("choose login-page or sign-up page(IF U DON'T HAVE A ACCOUNT)");
                choice = Console.ReadLine();
                if (choice == "login")
                {
                    ott2.login();
                    Console.WriteLine("The index of your account profiles:");
                    for (int i = 0; i < manageProf.size; i++)
                    {
                        Console.WriteLine(names_Ap[i]);
                    }
                    Console.WriteLine("Select your profile index");
                    sp = Convert.ToInt16(Console.ReadLine());
                }
                else if (choice == "sign-up")
                {
                    ott2.signup();
                    Console.WriteLine("\n");
                    amt = ott2.plans();
                    Console.WriteLine("\n");
                    mode = ott2.paymentOptions(amt);
                    b1("AMAZON", amt, mode);
                    ott2.login();
                }
                Console.WriteLine("SELECT THE -- MOVIES SECTION OR SERIES SECTION --");
                sec = Console.ReadLine();
                if (sec == "series")
                {
                    Console.WriteLine("==============================");
                    sh2.shows_Ap();
                    Console.WriteLine("==============================");
                    Console.WriteLine("\n");
                    Console.WriteLine("if you want to: \nsearch any show (PRESS 1) \nfind genre and filter based on rating(PRESS 2) \nExit (PRESS 3)");
                    ch = Console.ReadLine();
                    if (ch == "1")
                    {
                        sh2.search_Ap_shows();
                    }
                    else if (ch == "2")
                    {
                        sh2.select_Ap_genre();
                    }
                    else
                    {
                        break;
                    }
                }
                else if (sec == "movies")
                {
                    Console.WriteLine("==============================");
                    sh2.movies_Ap();
                    Console.WriteLine("==============================");
                    Console.WriteLine("\n");
                    Console.WriteLine("if you want to: \nSearch any show (PRESS 1) \n\tSelect genre and filter based on rating(PRESS 2) \n\t\tExit (PRESS 3)");
                    ch = Console.ReadLine();
                    if (ch == "1")
                    {
                        sh2.search_Ap_movies();
                    }
                    else if (ch == "2")
                    {
                        sh2.select_Ap_movie_genre();
                    }
                    else
                    {
                        break;
                    }
                }

                break;
            }
            Console.WriteLine("\n");
            Console.WriteLine("if you are paying both press 1 else 0");
            try
            {
                int a = Convert.ToInt16(Console.ReadLine());
                if (a == 1)
                {
                    Console.WriteLine("Enter the price of both of your plans ");
                    Console.WriteLine("Amount Paid for Netflix");
                    int net = Convert.ToInt16(Console.ReadLine());
                    Console.WriteLine("Amount Paid for Amazon Prime");
                    int     ama = Convert.ToInt16(Console.ReadLine());
                    payment p1  = new payment(net);
                    payment p2  = new payment(ama);
                    payment p3  = new payment();
                    p3 = p1 + p2;
                    p3.discount();
                }
                else
                {
                    Console.WriteLine("Take both subscriptions and get our Special offer");
                }
            }

            catch (System.Exception)
            {
                Console.WriteLine("exception thrown");
                // Console.WriteLine(e);
            }
        }
コード例 #12
0
        private async void Login(string username, string password)
        {
            _netflix = await Netflix.Login(username, password);

            SetupNetflix(_netflix);
        }