Esempio n. 1
0
        private void findTvDBSeries(string searchString)
        {
            List<Show> results = tvdb.Search(searchString, 5);
            if (results.Count != 0)
            {
                var dialog = new SelectMovie(results);
                string path = currentDir + "\\" + MovieBox.SelectedItem;
                if (dialog.ShowDialog() == DialogResult.OK)
                {
                    // Process the stuff
                    Show tvSerie = dialog.getSelectedTVShow();
                    var webClient = new WebClient();
                    var file = path + "\\cover.jpg";
                    webClient.DownloadFile(tvSerie.Poster, file);
                    var writeXMl = new WriteTvInfoToXml(tvSerie, path);
                }

            }
            else if (results.Count == 0)
            {
                MessageBox.Show("Nothing found on TheTVDB");
            }
        }
Esempio n. 2
0
        private void FindMovie(string searchString)
        {
            SearchContainer<SearchMovie> searchResults = client.SearchMovie(searchString);

            if (searchResults.TotalResults != 0)
            {
                var dialog = new SelectMovie(searchResults);
                if (dialog.ShowDialog() == DialogResult.OK)
                {
                    // Process the stuff
                    SearchMovie selectedMovie = dialog.getSelectedItemMovie();
                    var movie = client.GetMovie(selectedMovie.Id, MovieMethods.Credits);
                    string path = currentDir + "\\" + MovieBox.SelectedItem;
                    var file = path + "\\cover.jpg";
                    var webClient = new WebClient();
                    webClient.DownloadFile("https://image.tmdb.org/t/p/original" + movie.PosterPath, file);
                    var temp = new WriteMovieInfoToXML(movie, path);
                }
            }
            else
            {
                MessageBox.Show("Nothing found on TheMovieDB");
            }
        }