Exemplo n.º 1
0
        //

        // Random Movie Button (I'm Feeling Lucky)
        private void btnMoviesRandom_ClickButtonArea(object Sender, MouseEventArgs e)
        {
            imgSpinner.Visible = true;

            Thread.Sleep(100);

            var data = OMDbEntity.FromJson(UtilityTools.Random(dataMovies));

            ctrlMovieDetails MovieDetails = new ctrlMovieDetails();

            MovieDetails.infoTitle.Text      = data.Title;
            MovieDetails.infoYear.Text       = data.Year;
            MovieDetails.infoGenre.Text      = data.Genre;
            MovieDetails.infoSynopsis.Text   = data.Plot;
            MovieDetails.infoRuntime.Text    = data.Runtime;
            MovieDetails.infoRated.Text      = data.Rated;
            MovieDetails.infoDirector.Text   = data.Director;
            MovieDetails.infoCast.Text       = data.Actors;
            MovieDetails.infoRatingIMDb.Text = data.ImdbRating;
            MovieDetails.infoImdbId          = data.ImdbID;
            MovieDetails.infoImagePoster     = data.Poster;
            MovieDetails.infoFanartUrl       = data.imageFanart;
            MovieDetails.infoTrailerUrl      = data.trailerUrl;

            try
            {
                MovieDetails.imgPoster.Image = UtilityTools.ChangeOpacity(UtilityTools.LoadPicture(data.Poster), 1);
                MovieDetails.BackgroundImage = UtilityTools.ChangeOpacity(UtilityTools.LoadPicture(data.imageFanart), 0.2F);
            }
            catch { }

            foreach (string movieLink in data.Sources)
            {
                MovieDetails.addStream(movieLink, false, false, MovieDetails.panelFiles);
            }

            if (data.YifyTorrent480p != null && data.YifyTorrent480p != "")
            {
                MovieDetails.addStream(data.YifyTorrent480p, false, true, MovieDetails.panelTorrents, "480p");
            }

            if (data.YifyTorrent720p != null && data.YifyTorrent720p != "")
            {
                MovieDetails.addStream(data.YifyTorrent720p, false, true, MovieDetails.panelTorrents, "720p");
            }

            if (data.YifyTorrent1080p != null && data.YifyTorrent1080p != "")
            {
                MovieDetails.addStream(data.YifyTorrent1080p, false, true, MovieDetails.panelTorrents, "1080p");
            }


            MovieDetails.Dock = DockStyle.Fill;
            tabBlank.Controls.Clear();
            tabBlank.Controls.Add(MovieDetails);
            imgSpinner.Visible = false;
            tab.SelectedTab    = tabBlank;
        }
Exemplo n.º 2
0
        public List <ctrlPoster> LoadMovies(int loadCount)
        {
            lock (loadMoviesLock)
            {
                List <ctrlPoster> MoviesPosters = new List <ctrlPoster>();
                int loadedCount = 0;

                foreach (string movie in dataMovies.Reverse().Skip(countedMovies))
                {
                    if (loadedCount < loadCount)
                    {
                        if (string.IsNullOrEmpty(movie) == false)
                        {
                            var data = OMDbEntity.FromJson(movie);

                            if (data.ImdbID.ToLower() == txtMoviesSearchBox.Text.ToLower() | data.Title.ToLower().Contains(txtMoviesSearchBox.Text.ToLower()) | data.Actors.ToLower().Contains(txtMoviesSearchBox.Text.ToLower()) && data.Year.Contains(selectedYear) && data.Genre.ToLower().Contains(selectedGenre.ToLower()))
                            {
                                ctrlPoster ctrlPoster = new ctrlPoster();
                                ctrlPoster.infoTitle.Text = data.Title;
                                ctrlPoster.infoYear.Text  = data.Year;

                                ctrlPoster.infoPoster.BackgroundImage = UtilityTools.LoadPicture(data.Poster);

                                ctrlPoster.infoGenres   = data.Genre;
                                ctrlPoster.infoSynopsis = data.Plot;
                                ctrlPoster.infoRuntime  = data.Runtime;
                                ctrlPoster.infoRated    = data.Rated;
                                ctrlPoster.infoDirector = data.Director;
                                ctrlPoster.infoCast     = data.Actors;

                                ctrlPoster.infoImdbRating = data.ImdbRating;
                                ctrlPoster.infoImdbId     = data.ImdbID;

                                ctrlPoster.infoImagePoster = data.Poster;
                                ctrlPoster.Name            = data.ImdbID;
                                ctrlPoster.infoMovieFiles  = data.Sources;

                                ctrlPoster.infoYifyTorrent480p  = data.YifyTorrent480p;
                                ctrlPoster.infoYifyTorrent720p  = data.YifyTorrent720p;
                                ctrlPoster.infoYifyTorrent1080p = data.YifyTorrent1080p;

                                ctrlPoster.infoPopcornTorrent720p  = data.PopcornTorrent720p;
                                ctrlPoster.infoPopcornTorrent1080p = data.PopcornTorrent1080p;

                                ctrlPoster.infoTrailer     = data.trailerUrl;
                                ctrlPoster.infoImageFanart = data.imageFanart;

                                ctrlPoster.Show();
                                MoviesPosters.Add(ctrlPoster);
                                loadedCount += 1;
                            }
                            countedMovies += 1;
                        }
                    }
                }
                return(MoviesPosters);
            }
        }
Exemplo n.º 3
0
        private void InfoPoster_ClickButtonArea(object Sender, MouseEventArgs e)
        {
            frmOpenTheatre.form.tabBlank.Controls.Clear();

            ctrlDetails MovieDetails = new ctrlDetails();

            MovieDetails.infoTitle.Text      = infoTitle.Text;
            MovieDetails.infoYear.Text       = infoYear.Text;
            MovieDetails.infoGenre.Text      = infoGenres;
            MovieDetails.infoSynopsis.Text   = infoSynopsis;
            MovieDetails.infoRuntime.Text    = infoRuntime;
            MovieDetails.infoRated.Text      = infoRated;
            MovieDetails.infoDirector.Text   = infoDirector;
            MovieDetails.infoCast.Text       = infoCast;
            MovieDetails.infoRatingIMDb.Text = infoImdbRating;
            MovieDetails.infoImdbId          = infoImdbId;
            MovieDetails.infoTrailerUrl      = infoTrailer;
            MovieDetails.infoFanartUrl       = infoImageFanart;
            MovieDetails.infoImagePoster     = infoImagePoster;

            try
            {
                MovieDetails.imgPoster.Image = UtilityTools.ChangeOpacity(UtilityTools.LoadPicture(infoImagePoster), 1);
                MovieDetails.BackgroundImage = UtilityTools.ChangeOpacity(UtilityTools.LoadPicture(infoImageFanart), 0.2F);
            }
            catch { }

            foreach (string movieLink in infoMovieFiles)
            {
                MovieDetails.addStream(movieLink, false, false, MovieDetails.panelFiles);
            }

            if (infoMovieTorrent480p != null && infoMovieTorrent480p != "")
            {
                MovieDetails.addStream(infoMovieTorrent480p, false, true, MovieDetails.panelTorrents, "480p");
            }

            if (infoMovieTorrent720p != null && infoMovieTorrent720p != "")
            {
                MovieDetails.addStream(infoMovieTorrent720p, false, true, MovieDetails.panelTorrents, "720p");
            }

            if (infoMovieTorrent1080p != null && infoMovieTorrent1080p != "")
            {
                MovieDetails.addStream(infoMovieTorrent1080p, false, true, MovieDetails.panelTorrents, "1080p");
            }

            MovieDetails.Dock = DockStyle.Fill;
            frmOpenTheatre.form.tabBlank.Controls.Clear();
            frmOpenTheatre.form.tabBlank.Controls.Add(MovieDetails);
            frmOpenTheatre.form.tab.SelectedTab = frmOpenTheatre.form.tabBlank;
        }
Exemplo n.º 4
0
        private void InfoPoster_ClickButtonArea(object Sender, MouseEventArgs e)
        {
            MainForm.form.tabBlank.Controls.Clear();

            MovieDetails MovieDetails = new MovieDetails();

            MovieDetails.infoTitle.Text      = infoTitle.Text;
            MovieDetails.infoYear.Text       = infoYear.Text;
            MovieDetails.infoGenre.Text      = infoGenres;
            MovieDetails.infoSynopsis.Text   = infoSynopsis;
            MovieDetails.infoRuntime.Text    = infoRuntime;
            MovieDetails.infoRated.Text      = infoRated;
            MovieDetails.infoDirector.Text   = infoDirector;
            MovieDetails.infoCast.Text       = infoCast;
            MovieDetails.infoRatingIMDb.Text = infoImdbRating;
            MovieDetails.ImdbId     = infoImdbId;
            MovieDetails.TrailerURL = infoTrailer;
            MovieDetails.FanartURL  = infoImageFanart;
            MovieDetails.PosterURL  = infoImagePoster;

            try
            {
                if (infoImagePoster != "")
                {
                    MovieDetails.imgPoster.Image = UtilityTools.SetAlpha(UtilityTools.LoadPicture(infoImagePoster), 255);
                }
                if (infoImageFanart != "")
                {
                    MovieDetails.BackgroundImage = UtilityTools.SetAlpha(UtilityTools.LoadPicture(infoImageFanart), 50);
                }
            }
            catch (Exception ex) { MessageBox.Show(ex.Message + "\n\n" + infoImageFanart); }

            foreach (var movieLink in infoMovieStreams)
            {
                MovieDetails.AddStream(movieLink, false, MovieDetails.panelStreams);
            }

            MovieDetails.Dock = DockStyle.Fill;
            MainForm.form.tabBlank.Controls.Clear();
            MainForm.form.tabBlank.Controls.Add(MovieDetails);
            MainForm.form.tab.SelectedTab = MainForm.form.tabBlank;
        }
Exemplo n.º 5
0
        private void InfoPoster_ClickButtonArea(object Sender, MouseEventArgs e)
        {
            frmOpenTheatre.form.tabBlank.Controls.Clear();

            ctrlDetails MovieDetails = new ctrlDetails();

            MovieDetails.infoTitle.Text      = infoTitle.Text;
            MovieDetails.infoYear.Text       = infoYear.Text;
            MovieDetails.infoGenre.Text      = infoGenres;
            MovieDetails.infoSynopsis.Text   = infoSynopsis;
            MovieDetails.infoRuntime.Text    = infoRuntime;
            MovieDetails.infoRated.Text      = infoRated;
            MovieDetails.infoDirector.Text   = infoDirector;
            MovieDetails.infoCast.Text       = infoCast;
            MovieDetails.infoRatingIMDb.Text = infoImdbRating;
            MovieDetails.infoImdbId          = infoImdbId;
            MovieDetails.infoTrailerUrl      = infoTrailer;


            try
            {
                MovieDetails.imgPoster.Image = UtilityTools.ChangeOpacity(UtilityTools.LoadPicture(infoImagePoster), 1);
                MovieDetails.BackgroundImage = UtilityTools.ChangeOpacity(UtilityTools.LoadPicture(infoImageFanart), 0.2F);
            }
            catch { }

            if (infoImagePoster == "")
            {
                MovieDetails.imgPoster.Image = UtilityTools.ChangeOpacity(Properties.Resources.poster_default, 1);
            }
            if (infoImageFanart == "")
            {
                MovieDetails.BackgroundImage = UtilityTools.ChangeOpacity(Properties.Resources.background_original, 0.5F);
            }
            if (infoTrailer == "")
            {
                MovieDetails.btnWatchTrailer.Visible = false;
            }

            foreach (string movieLink in infoMovieFiles)
            {
                ctrlStreamInfo ctrlInfo = new ctrlStreamInfo();
                ctrlInfo.infoFileURL       = new Uri(movieLink).AbsoluteUri;
                ctrlInfo.infoFileHost.Text = new Uri(movieLink).Host.Replace("www.", "");
                ctrlInfo.infoFileName.Text = Path.GetFileNameWithoutExtension(new Uri(movieLink).LocalPath);
                MovieDetails.panelFiles.Controls.Add(ctrlInfo);
            }


            //  Magnet : magnet:?xt=urn:btih:TORRENT_HASH&dn=Url+Encoded+Movie+Name&tr=http://track.one:1234/announce&tr=udp://track.two:80
            string trackers = "&tr=" + "udp://open.demonii.com:1337/announce" + " &tr=" + "udp://tracker.openbittorrent.com:80" + "&tr=" + "udp://tracker.coppersurfer.tk:6969" + "&tr=" + "udp://glotorrents.pw:6969/announce" + "&tr=" + "udp://tracker.opentrackr.org:1337/announce" + "&tr=" + "udp://torrent.gresille.org:80/announce" + "&tr=" + "udp://p4p.arenabg.com:1337" + "&tr=" + "udp://tracker.leechers-paradise.org:6969";

            if (infoMovieTorrent480p == "" && infoMovieTorrent720p == "" && infoMovieTorrent1080p == "")
            {
                MovieDetails.panelTitleTorrents.Visible = false;
                MovieDetails.panelTorrents.Visible      = false;
            }
            else
            {
                if (infoMovieTorrent480p != "")
                {
                    ctrlStreamInfo ctrlInfo = new ctrlStreamInfo();
                    ctrlInfo.isTorrent         = true;
                    ctrlInfo.infoFileURL       = new Uri(infoMovieTorrent480p).AbsoluteUri;
                    ctrlInfo.infoFileHost.Text = new Uri(infoMovieTorrent480p).Host.Replace("www.", "");
                    ctrlInfo.infoFileName.Text = infoTitle.Text + " (" + infoYear.Text + ") [" + "480p" + "] [" + "YTS.AG" + "]";
                    ctrlInfo.infoMagnet        = "magnet:?xt=urn:btih:" + Path.GetFileName(infoMovieTorrent1080p) + "&dn=" + infoTitle.Text.Replace(" ", "+") + "%28" + infoYear.Text + "%29+%5B" + "720p" + "%5D+%5B" + "YTS.AG" + "%5D" + trackers;
                    MovieDetails.panelTorrents.Controls.Add(ctrlInfo);
                }

                if (infoMovieTorrent720p != "")
                {
                    ctrlStreamInfo ctrlInfo = new ctrlStreamInfo();
                    ctrlInfo.isTorrent         = true;
                    ctrlInfo.infoFileURL       = new Uri(infoMovieTorrent720p).AbsoluteUri;
                    ctrlInfo.infoFileHost.Text = new Uri(infoMovieTorrent720p).Host.Replace("www.", "");
                    ctrlInfo.infoFileName.Text = infoTitle.Text + " (" + infoYear.Text + ") [" + "720p" + "] [" + "YTS.AG" + "]";
                    ctrlInfo.infoMagnet        = "magnet:?xt=urn:btih:" + Path.GetFileName(infoMovieTorrent1080p) + "&dn=" + infoTitle.Text.Replace(" ", "+") + "%28" + infoYear.Text + "%29+%5B" + "720p" + "%5D+%5B" + "YTS.AG" + "%5D" + trackers;
                    MovieDetails.panelTorrents.Controls.Add(ctrlInfo);
                }

                if (infoMovieTorrent1080p != "")
                {
                    ctrlStreamInfo ctrlInfo = new ctrlStreamInfo();
                    ctrlInfo.isTorrent         = true;
                    ctrlInfo.infoFileURL       = new Uri(infoMovieTorrent1080p).AbsoluteUri;
                    ctrlInfo.infoFileHost.Text = new Uri(infoMovieTorrent1080p).Host.Replace("www.", "");
                    ctrlInfo.infoFileName.Text = infoTitle.Text + " (" + infoYear.Text + ") [" + "1080p" + "] [" + "YTS.AG" + "]";
                    ctrlInfo.infoMagnet        = "magnet:?xt=urn:btih:" + Path.GetFileName(infoMovieTorrent1080p) + "&dn=" + infoTitle.Text.Replace(" ", "+") + "%28" + infoYear.Text + "%29+%5B" + "720p" + "%5D+%5B" + "YTS.AG" + "%5D" + trackers;
                    MovieDetails.panelTorrents.Controls.Add(ctrlInfo);
                }
            }


            MovieDetails.Dock = DockStyle.Fill;
            frmOpenTheatre.form.tabBlank.Controls.Clear();
            frmOpenTheatre.form.tabBlank.Controls.Add(MovieDetails);
            frmOpenTheatre.form.tab.SelectedTab = frmOpenTheatre.form.tabBlank;
        }