Beispiel #1
0
        private void InfoPoster_ClickButtonArea(object Sender, MouseEventArgs e)
        {
            try
            {
                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;

                try
                {
                    MovieDetails.imgPoster.Image = UtilityTools.ChangeOpacity(frmOpenTheatre.LoadPicture(infoImagePoster), 1);
                    MovieDetails.BackgroundImage = UtilityTools.ChangeOpacity(frmOpenTheatre.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);
                }

                foreach (string movieLink in infoMovieLinks)
                {
                    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.panelStreams.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;
            }
            catch (Exception ex) { MessageBox.Show(ex.Message); }
        }
Beispiel #2
0
        public void addStream(string URL, bool isLocal, bool isTorrent, Panel toPanel, string torrentName = "", string quality = "")
        {
            if (isLocal == false && isTorrent == false)
            {
                ctrlStreamInfo ctrlInfo = new ctrlStreamInfo();
                ctrlInfo.infoFileURL       = new Uri(URL).AbsoluteUri;
                ctrlInfo.infoFileHost.Text = new Uri(URL).Host.Replace("www.", "");
                ctrlInfo.infoFileName.Text = Path.GetFileName(new Uri(URL).LocalPath);
                toPanel.Controls.Add(ctrlInfo);
            }
            else if (isLocal == true && isTorrent == false)
            {
                ctrlStreamInfo ctrlInfo = new ctrlStreamInfo();
                ctrlInfo.infoFileURL       = URL;
                ctrlInfo.infoFileHost.Text = new Uri(URL).Host.Replace("www.", "");
                ctrlInfo.infoFileName.Text = Path.GetFileName(new Uri(URL).LocalPath);
                ctrlInfo.isLocal           = isLocal;
                toPanel.Controls.Add(ctrlInfo);
            }
            else if (isLocal == false && isTorrent == true)
            {
                if (torrentName == "YIFY")
                {
                    ctrlStreamInfo ctrlInfo = new ctrlStreamInfo();

                    //  Trackers : Public trackers for Magnets
                    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";

                    //  Magnet : magnet:?xt=urn:btih:TORRENT_HASH&dn=Url+Encoded+Movie+Name&tr=http://track.one:1234/announce&tr=udp://track.two:80
                    ctrlInfo.infoMagnet = "magnet:?xt=urn:btih:" + Path.GetFileName(URL) + "&dn=" + infoTitle.Text.Replace(" ", "+") + "%28" + infoYear.Text + "%29+%5B" + "720p" + "%5D+%5B" + "YTS.AG" + "%5D" + trackers;

                    ctrlInfo.isTorrent         = true;
                    ctrlInfo.infoFileURL       = new Uri(URL).AbsoluteUri;
                    ctrlInfo.infoFileHost.Text = "YIFY";
                    ctrlInfo.infoFileName.Text = infoTitle.Text + " (" + infoYear.Text + ") [" + quality + "] [" + "YIFY" + "].torrent";
                    toPanel.Controls.Add(ctrlInfo);
                }
                else if (torrentName == "POPCORN")
                {
                    ctrlStreamInfo ctrlInfo = new ctrlStreamInfo();
                    ctrlInfo.imgDownload.Visible = false;
                    ctrlInfo.infoMagnet          = URL;
                    ctrlInfo.isTorrent           = true;
                    ctrlInfo.infoFileURL         = new Uri(URL).AbsoluteUri;
                    ctrlInfo.infoFileHost.Text   = "Popcorn Time";
                    ctrlInfo.infoFileName.Text   = infoTitle.Text + " (" + infoYear.Text + ") [" + quality + "] [" + "POPCORN TIME" + "].torrent";
                    toPanel.Controls.Add(ctrlInfo);
                }
            }
        }
Beispiel #3
0
        public void showFileDetails(string webFile)
        {
            ctrlDetails MovieDetails = new ctrlDetails();

            string url = "";

            string[] movieName  = getMovieAndYear(Path.GetFileNameWithoutExtension(webFile));
            string[] tvshowName = getTVShowName(Path.GetFileNameWithoutExtension(webFile));

            if (!(movieName == null))
            {
                url = "http://omdbapi.com/?apikey=c933e052&t=" + movieName[0] + "&y=" + movieName[1] + "&plot=full";
            }
            else if (!(tvshowName == null))
            {
                url = "http://omdbapi.com/?apikey=c933e052&t=" + tvshowName[0] + "&Season=" + tvshowName[1] + "&Episode=" + tvshowName[2];
            }

            if (url != "")
            {
                using (WebClient wc = new WebClient())
                {
                    var JsonOMDbAPI = wc.DownloadString(url);
                    var data        = OMDbEntity.FromJson(JsonOMDbAPI);

                    if (data.Response == "True")
                    {
                        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;

                        try { MovieDetails.imgPoster.Image = ChangeOpacity(LoadPicture(data.Poster), 1); } catch { MovieDetails.imgPoster.Image = ChangeOpacity(Properties.Resources.default_poster, 0.5F); }
                    }
                    else
                    {
                        MovieDetails.infoTitle.Text         = Path.GetFileNameWithoutExtension(new Uri(webFile).LocalPath);
                        MovieDetails.infoYear.Visible       = false;
                        MovieDetails.infoGenre.Visible      = false;
                        MovieDetails.infoSynopsis.Visible   = false;
                        MovieDetails.infoRuntime.Visible    = false;
                        MovieDetails.infoRated.Visible      = false;
                        MovieDetails.infoDirector.Visible   = false;
                        MovieDetails.infoCast.Visible       = false;
                        MovieDetails.infoRatingIMDb.Visible = false;

                        MovieDetails.infoSplitter0.Visible  = false;
                        MovieDetails.infoSplitter1.Visible  = false;
                        MovieDetails.infoSplitter2.Visible  = false;
                        MovieDetails.infoSplitter3.Visible  = false;
                        MovieDetails.infoSplitter4.Visible  = false;
                        MovieDetails.imgIMDb.Visible        = false;
                        MovieDetails.lblSubDirector.Visible = false;
                        MovieDetails.lblSubCast.Visible     = false;


                        MovieDetails.imgPoster.Image = ChangeOpacity(Properties.Resources.default_poster, 0.5F);
                    }
                }
            }

            try
            {
                // Details from Popcorn Time API for Background (fanart/trailer)
                var jsonPopcornTime = client.DownloadString("https://tv-v2.api-fetch.website/movie/" + MovieDetails.infoImdbId);
                var data            = PopcornTimeEntity.FromJson(jsonPopcornTime);

                try { tabBlank.BackgroundImage = ChangeOpacity(LoadPicture(data.Images.Fanart), 0.2F); }
                catch { tabBlank.BackgroundImage = ChangeOpacity(Properties.Resources.background_original, 0.2F); }
                MovieDetails.infoFanartUrl  = data.Images.Fanart;
                MovieDetails.infoTrailerUrl = data.Trailer;
                //MovieDetails.btnFileTrailer.Visible = true;
            }
            catch
            {
                tabBlank.BackgroundImage    = ChangeOpacity(Properties.Resources.background_original, 0.4F);
                MovieDetails.infoFanartUrl  = "";
                MovieDetails.infoTrailerUrl = "";
                //MovieDetails.btnFileTrailer.Visible = false;
            }

            ctrlStreamInfo ctrlInfo = new ctrlStreamInfo();

            ctrlInfo.infoFileURL       = webFile;
            ctrlInfo.infoFileHost.Text = new Uri(webFile).Host;
            ctrlInfo.infoFileName.Text = Path.GetFileName(new Uri(webFile).LocalPath);
            MovieDetails.panelStreams.Controls.Add(ctrlInfo);
            MovieDetails.Dock = DockStyle.Fill;
            tabBlank.Controls.Clear();
            tabBlank.Controls.Add(MovieDetails);
            tab.SelectedTab = tabBlank;
        }
Beispiel #4
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;
        }