private void frmInformation_Load(object sender, EventArgs e) { //Gets well, the info List <String> countries = new List <String>(); myPoster = API.GetMovieImages(movieID, "en"); myMovie = API.GetMovieInfo(movieID); txtTitle.Text = myMovie.title; txtYear.Text = myMovie.release_date.ToString(); //Don't know if there works for all movies...... try { picPoster.ImageLocation = "http://image.tmdb.org/t/p/w185" + myPoster.posters[0].file_path; } catch (ArgumentException) { picPoster.ImageLocation = "noposter.jpg"; } richTextBox1.Text = myMovie.overview; lstActors.DataSource = API.GetMovieCast(movieID).cast; //Craziness to just get the rating but makes sense foreach (ReleaseCountry elements in API.GetMovieReleases(movieID).countries) { countries.Add(elements.certification); txtRating.Text = countries[0]; } //Crew members, really I only wanted director but this works, the more info the better I guess ^_^ foreach (Crew members in API.GetMovieCast(movieID).crew) { lstCrew.Items.Add(members.job + ": " + members.name); } }
/// <summary> /// Constructor to interface directly with the TMDB movie type. /// </summary> /// <param name="toSet"></param> public Movie(TmdbMovie movie) { TMDBHelper tmdbHelper = new TMDBHelper(); TmdbMovieImages image = tmdbHelper.getImagesById(movie.id); string posterLocation = ""; try { posterLocation = image.posters[0].file_path; } catch { posterLocation = "NONE"; } description = movie.overview; imageLocation = posterLocation; mid = movie.id; name = movie.title; onlineRating = movie.vote_average; userRating = 0.0; year = movie.release_date; genres = movie.genres; }
public override bool GetResults(string keywords, string imdbID, bool skipImages) { bool result = false; api = new Tmdb(AccessKey, FileManager.Configuration.Options.MovieSheetsOptions.TVShowsLanguage); configuration = api.GetConfiguration(); TmdbMovie movie = null; if (!string.IsNullOrEmpty(imdbID)) { movie = api.GetMovieByIMDB(imdbID, FileManager.Configuration.Options.MovieSheetsOptions.TVShowsLanguage); if (movie != null) { result = GetResults(new[] { movie }); } } if (movie == null)// no imdb identification,use list { var searchResults = api.SearchMovie(Escape(keywords), 1); if (searchResults.results.Any()) { var list = searchResults.results.Select(item => api.GetMovieInfo(item.id)).ToList(); result = GetResults(list); } } return(result); }
public List <TmdbMovie> SerachFormMovieByTitle(string title) { using (WebClient wc = new WebClient()) { try { var json = wc.DownloadString(string.Format("https://api.themoviedb.org/3/search/movie?api_key={1}&query={0}", title, ApiKey)); JObject jObject = JObject.Parse(json); var token = jObject.SelectToken("results"); List <TmdbMovie> moviesToReturn = new List <TmdbMovie>(); foreach (var item in token) { TmdbMovie tmdbMovie = JsonConvert.DeserializeObject <TmdbMovie>(JsonConvert.SerializeObject(item)); moviesToReturn.Add(tmdbMovie); } return(moviesToReturn); } catch (Exception) { throw new FaultException("something went wrong"); } } }
private TmdbMovie GetMovieById(int id) { ChannelFactory <ITmdbSearchService> factory = new ChannelFactory <ITmdbSearchService>(""); ITmdbSearchService proxy = factory.CreateChannel(); TmdbMovie movieToReturn = proxy.SearchForMovieById(id); factory.Close(); return(movieToReturn); }
private Movie ConvertToMovie(TmdbMovie tmdbMovie) { // clean up fields if (!tmdbMovie.Runtime.HasValue) { tmdbMovie.Runtime = 0; } // create the Movie from the tmdbMovie var movie = JsonConvert.DeserializeObject <Movie>(JsonConvert.SerializeObject(tmdbMovie)); movie.Id = nameof(Movie) + IdSeparator + movie.Id; movie.Tags = tmdbMovie.Genres.Select(g => g.Name).ToList(); // set images movie.MainImagePath = tmdbMovie.PosterPath; // create the connections movie.Connections = new List <Connection>(); foreach (var cast in tmdbMovie.Credits.Cast.Where(c => !string.IsNullOrEmpty(c.ProfilePath))) { movie.Connections.Add(new Connection { ConnectedId = nameof(Artist) + IdSeparator + cast.Id, Type = ConnectionType.Actor, Label = cast.Character }); } foreach (var cast in tmdbMovie.Credits.Crew.Where(c => !string.IsNullOrEmpty(c.ProfilePath))) { ConnectionType type; if (_handledCrewJobs.TryGetValue(cast.Job, out type)) { movie.Connections.Add(new Connection { ConnectedId = nameof(Artist) + IdSeparator + cast.Id, Type = type, Label = cast.Job }); } else { movie.Connections.Add(new Connection { ConnectedId = nameof(Artist) + IdSeparator + cast.Id, Type = ConnectionType.Crew, Label = cast.Job }); } } return(movie); }
public async Task <TmdbMovie> GetMovieByIdAsync(long id) { TmdbMovie movie = null; var response = await client.GetAsync(Settings.GetMovieByIdUrl(id)); if (response.IsSuccessStatusCode) { movie = await response.Content.ReadAsAsync <TmdbMovie>(); } return(movie); }
private MovieInfo GetMovieInfo(TmdbMovie source) { var result = new MovieInfo(); if (source == null) { return(result); } result.Name = source.title; result.OriginalTitle = source.original_title; if (string.IsNullOrEmpty(result.OriginalTitle)) { result.OriginalTitle = result.Name; } result.Year = string.IsNullOrEmpty(source.release_date) ? string.Empty : source.release_date.Substring(0, 4); result.Homepage = source.homepage; result.IMDBID = source.imdb_id; result.Rating = source.vote_average.ToString("N0"); if (!string.IsNullOrEmpty(source.release_date)) { try { result.SetReleaseDate(GetFormattedDate(source.release_date)); } catch { } } result.Overview = source.overview; result.Tagline = source.tagline; var trailers = api.GetMovieTrailers(source.id); if (trailers.youtube != null && trailers.youtube.Any()) { result.Trailer = string.Format("http://www.youtube.com/watch?v={0}", trailers.youtube.First().source); } var cast = api.GetMovieCast(source.id); if (cast != null && cast.cast != null && cast.cast.Any()) { result.Cast.AddRange(cast.cast.Select(x => x.name)); } if (cast != null && cast.crew != null && cast.crew.Any(x => x.job == "Director")) { result.Director.Add(cast.crew.Where(x => x.job == "Director").Select(x => x.name).First()); } result.Genre.AddRange(source.genres.Select(x => x.name)); result.Runtime = source.runtime.ToString(CultureInfo.InvariantCulture); result.Studios.AddRange(source.production_companies.Select(x => x.name)); result.Countries.AddRange(source.production_countries.Select(x => x.name)); return(result); }
static void Main() { using (var reader = JsonTextReader.CreateFrom(@"..\..\data.json")) { if (reader.SkipTo("seasons", 7)) { // move past the field name "name" if (JsonNodeType.Key != reader.NodeType || reader.Read()) { Console.WriteLine(reader.ParseSubtree()); } } } // or... using (var reader = JsonTextReader.CreateFrom(@"..\..\data.json")) { if (reader.SkipToField("created_by")) { if (reader.SkipToIndex(0)) { reader.Read(); if (reader.SkipToField("name")) { if (reader.Read()) { Console.WriteLine(reader.Value); } } } } } return; Tmdb.ApiKey = ApiKey; Tmdb.CacheLevel = JsonRpcCacheLevel.Aggressive; // hit it *hard* - 10 pages of movies, 10 of TV foreach (var movie in TmdbMovie.GetTopRated(0, 9)) { _RunMovieDemo(movie.Id); } foreach (var show in TmdbShow.GetTopRated(0, 9)) { _RunShowDemo(show.Id); } }
public async Task <TmdbMovie> GetMovieAsync(string title) { var movieSearchResults = await client.FindMovieAsync(title); TmdbMovie movie = null; if (movieSearchResults != null && movieSearchResults.results.Any()) { movie = await client.GetMovieByIdAsync(movieSearchResults.results.First().Id); } if (movie != null && movie.Poster_path != null) { movie.Poster_path = TmdbClient.Settings.GetImageUrl(movie.Poster_path); } return(movie); }
public void Push(Movie movie) { TmdbMovie dbMovie = Mapper.Instance.Map <TmdbMovie>(movie); var mov = _ctx.TmdbMovies.SingleOrDefault(x => x.Id == dbMovie.Id); if (mov != null) { _ctx.TmdbMovies.Remove(mov); _ctx.SaveChanges(); } _ctx.TmdbMovies.Add(dbMovie); _ctx.SaveChanges(); movie.Id = dbMovie.Id; }
public override void ViewDidLoad() { _table = new UITableView(new RectangleF(0, 0, View.Frame.Width, View.Frame.Height - 44), UITableViewStyle.Grouped); _table.Source = new LoadingDataSource(); View.Add(_table); ThreadPool.QueueUserWorkItem(delegate { _data = _api.GetMovieInfo(_movieId); _cast = _api.GetMovieCast(_movieId); InvokeOnMainThread(delegate { _table.Source = new DataSource(this); _table.ReloadData(); }); }); }
internal static TheMovieDb.TmdbMovie LookupMovieOnLine(string str) { TmdbMovie currentMovie = new TheMovieDb.TmdbMovie(); try { TmdbApi login = new TheMovieDb.TmdbApi("d49ca7319b09616c927940697304294c"); TmdbMovie m = login.MovieSearch(str).FirstOrDefault(); //if( currentMovie = login.MovieSearchByImdb(m.ImdbId).FirstOrDefault(); } catch (Exception ex) { //do nothing } return(currentMovie); }
public override void SelectMetadata(object metadata) { TmdbMovie movie = metadata as TmdbMovie; TmdbImage image = null; if (movie != null && movie.Backdrops != null) { image = movie.Backdrops.OrderByDescending(i => i.Image.Width).FirstOrDefault(); } if (image != null) { Backdrop = image.Image.Url; } else { Backdrop = stockBackdrop; } }
public TmdbMovie SearchForMovieById(int id) { using (WebClient wc = new WebClient()) { try { var json = wc.DownloadString(string.Format("https://api.themoviedb.org/3/movie/{0}?api_key={1}&language=en-US", id, ApiKey)); JObject jObject = JObject.Parse(json); TmdbMovie tmdbMovie = JsonConvert.DeserializeObject <TmdbMovie>(JsonConvert.SerializeObject(jObject)); return(tmdbMovie); } catch (Exception) { throw new FaultException("something went wrong"); } } }
public void SaveMovie(TmdbMovie tmdbMovie) { if (tmdbMovie != null) { UnitOfWork.SavedMoviesRepository.Add(new SavedMovie() { MovieId = tmdbMovie.MovieId, Title = tmdbMovie.Title, Year = tmdbMovie.Year, Overview = tmdbMovie.Overview, ImageUrl = tmdbMovie.ImageUrl }); UnitOfWork.Commit(); } else { throw new FaultException("something went wrong"); } }
static Flick MapFromMovie( TmdbMovie movie ) { var image = movie.Images == null ? null : movie.Images.FirstOrDefault(x => x.Size == TmdbImageSize.cover && x.Type == TmdbImageType.poster); return new Flick { Name = movie.Name, Budget = string.IsNullOrEmpty(movie.Budget) ? 0 : Convert.ToDecimal(movie.Budget), Description = movie.Overview, RemoteId = movie.Id.ToString(), Rating = movie.Certification, RentalReleaseDate = movie.Released.HasValue ? (DateTime?) movie.Released.Value.AddMonths(6) : null, TheaterReleaseDate = movie.Released, Revenue = string.IsNullOrEmpty(movie.Revenue) ? 0 : Convert.ToDecimal(movie.Revenue), ThumbnailUrl = image == null ? "" : image.Url }; }
private static void PrintMovie(TmdbMovie result) { Console.WriteLine("Id: " + result.id); Console.WriteLine("Title: " + result.title); Console.WriteLine("BackdropPath: " + result.backdrop_path); Console.WriteLine("Budget: " + result.budget); Console.WriteLine("Genres: " + result.genres.JoinStrings(g => g.name, ",")); Console.WriteLine("Homepage: " + result.homepage); Console.WriteLine("Imdb: " + result.imdb_id); Console.WriteLine("Overview: " + result.overview); Console.WriteLine("Popularity: " + result.popularity); Console.WriteLine("PosterPath: " + result.poster_path); Console.WriteLine("Companies: " + result.production_companies.JoinStrings(p => p.name, ",")); Console.WriteLine("Countries: " + result.production_countries.JoinStrings(p => p.name, ",")); Console.WriteLine("ReleaseDate: " + result.release_date); Console.WriteLine("Revenue: " + result.revenue); Console.WriteLine("Runtime: " + result.runtime); Console.WriteLine("Title: " + result.spoken_languages.JoinStrings(s => s.name, ",")); Console.WriteLine("Tagline: " + result.tagline); Console.WriteLine("VoteAverage: " + result.vote_average); Console.WriteLine("VoteCount: " + result.vote_count); Console.WriteLine("Adult: " + result.adult); Console.WriteLine("OriginalTitle: " + result.original_title); }
public MovieUtilities(TmdbMovie movie, TmdbMovieCast cast) { this.movie = movie; this.cast = cast; }
static void Main() { var url = "http://api.themoviedb.org/3/tv/2129?api_key=c83a68923b7fe1d18733e8776bba59bb"; using (var reader = JsonTextReader.CreateFromUrl(url)) { // skip to "$.created_by[1].name" <-- JSON path syntax if (reader.SkipTo("created_by", 0, "name")) { // we're currently on the *key*/field name // we have to move to the value if we want // just that. if (reader.Read()) { Console.WriteLine(reader.ParseSubtree()); } else // below should never execute { Console.WriteLine("Sanity check failed, key has no value"); } // we need to move outward in the tree // so we can read the next array element // so we skip the rest of this object reader.SkipToEndObject(); if (reader.Read()) // read past the end of the object { reader.SkipToField("name"); // we're currently on the *key*/field name if (reader.Read()) { Console.WriteLine(reader.ParseSubtree()); } else // below should never execute { Console.WriteLine("Sanity check failed, key has no value"); } } else // below should never execute, we didn't expect to reach the end { Console.WriteLine("Sanity check failed, unexpected end of document"); } } else { Console.WriteLine("Not found"); } } return; using (var reader = JsonTextReader.CreateFromUrl("http://api.themoviedb.org/3/tv/2129?api_key=c83a68923b7fe1d18733e8776bba59bb")) { // skip to "$.created_by[1].name" <-- JSON path syntax if (reader.SkipTo("created_by", 1, "name")) { // we're currently on the *key*/field name // we have to move to the value if we want // just that. if (reader.Read()) { Console.WriteLine(reader.ParseSubtree()); } else // below should never execute { Console.WriteLine("Sanity check failed, key has no value"); } } else { Console.WriteLine("Not found"); } } return; using (var reader = JsonTextReader.CreateFrom(@"..\..\data.json")) { while (reader.Read()) { Console.Write(reader.NodeType); if (JsonNodeType.Value == reader.NodeType || JsonNodeType.Key == reader.NodeType) { Console.Write(" " + reader.Value); } Console.WriteLine(); } } return; using (var reader = JsonTextReader.CreateFrom(@"..\..\data.json")) { if (reader.SkipTo("seasons", 7, "episodes", 3, "guest_stars", 0, "character")) { // move past the field name if it's a key. if (JsonNodeType.Key != reader.NodeType || reader.Read()) { Console.WriteLine(reader.ParseSubtree()); } } } // or... using (var reader = JsonTextReader.CreateFrom(@"..\..\data.json")) { if (reader.SkipToField("created_by")) { if (reader.SkipToIndex(0)) { reader.Read(); if (reader.SkipToField("name")) { if (reader.Read()) { Console.WriteLine(reader.Value); } } } } } return; Tmdb.ApiKey = ApiKey; Tmdb.CacheLevel = JsonRpcCacheLevel.Aggressive; // hit it *hard* - 10 pages of movies, 10 of TV foreach (var movie in TmdbMovie.GetTopRated(0, 9)) { _RunMovieDemo(movie.Id); } foreach (var show in TmdbShow.GetTopRated(0, 9)) { _RunShowDemo(show.Id); } }
static void _RunCacheDemo() { // Normally, you don't really have to mess with the cache in a desktop app // or a console app. Long running apps and services will require some // maintenance. Otherwise caching is automatic. // Fetch a show. var show = new TmdbShow(2919); // get "Burn Notice" var movie = new TmdbMovie(219); // fetch "Volver" // right now our entries only have an id. use some properties // so we can get the show into the cache. Console.WriteLine("Fetched {0} from tmdb", show.Name); Console.WriteLine("Fetched {0} from tmdb", movie.Name); // write the cache to a file in the project directory //Tmdb.SaveCacheTo(@"..\..\cache.json"); // we won't use the above helper method since we want our cache to // be pretty printed JsonObject.SaveTo(Tmdb.Json, @"..\..\cache.json", " "); // Note that the cache is thread static. It's per thread instance. // Do not pass objects between threads. Serialize if you must like above // or in memory. // clear our cache. Tmdb.Json.Clear(); // any existing instances will be orphaned. this impacts equality as well. // if you MUST re-cache an orphaned object, what you can do is this: movie = new TmdbMovie(movie.Json); // this will copy the old json data into a new movie instance which will then root // that in the current cache. // should only have the movie we just re-rooted above in it. Console.WriteLine(Tmdb.Json); // that's cool but how about we load our cache that we saved? Tmdb.LoadCacheFrom(@"..\..\cache.json"); // Note that this MERGES the loaded data with the existing data. // You can call it multiple times in a row with different files // if you ever wanted to. This might be useful down the road // for cache differentials in a distributed system. There's also // LoadCacheFromUrl() with an eye toward distribution down the // road // remember if we create new TmdbEntry instances like movie or // TV objects, they will use the existing cache rather than // fetching from TMDB. // So, since we loaded the cache we should now be able to do show = new TmdbShow(3050); Console.WriteLine("This is cached: {0}", show.Name); // without making any remote requests. // use value equality semantics. // get the show again, this time through a search. // searches themselves are not cached, but each individual result // is. That means The Practice will get filled in with any additional // data returned from the search query. var showComparand = Tmdb.SearchShows("The Practice", minPage: 0, maxPage: 0)[0]; // check to make sure showComparand and show are actually two different TmdbShow wrapper instances // should report that they are different Console.WriteLine("Instances are {0} actual objects", ReferenceEquals(show, showComparand) ? "the same" : "different"); // check to make sure showComparand and show are actually logically equal. // should report that they are the equal Console.WriteLine("Instances are logically {0}", show == showComparand ? "equal" : "not equal"); // NOTES: // Clearing the cache "unroots" all existing instances of TmdbEntry // derived classes. They will no longer operate on anything you have a // root for. In fact, they are still writing to parts of the old cache. // The moral is don't hang on to object instances for longer than you need // them. Don't store them as class members or in collections just because. // Instead, use them and throw them away. Get a new object when you need // it. This will ensure that the most current cache is the one being used. // our show and movie instances are still valid, but are not writing or // reading from the current cache. // This also impacts equality. Objects from the old cache cannot be compared // to objects from the new cache. They will always return false. // Because of the above, it's best to release all instances of the old objects // when you clear the cache. The system does not track which object instances // are expired objects. You can check if an object is expired manually, but it's // expensive. // ideally, a batch of operations is performed, then the cache can be cleared, then // the next batch (with all new objects) is performed, if you clear the cache at all. // a server app or a long running desktop app should clear it periodically, but doing // so will make a bunch of HTTP requests happen again, even if they already happened // since they weren't cached anymore. // The HTTP requests might be cached through the second level caching mechanism. // // if you like, you can save and load the cache from disk, that way you can keep the cache // across application runs. Eventually it will get big and stale though. In the future I // might monitor the Tmdb.Configuration.ChangeKeys to expire old objects, if i can figure // out how it works exactly. }
static void Main(string[] args) { int[] moviesIds = { 389, 62, 20453, 453, 185, 702, 348, 705, 143, 279, 14, 73, 55, 93, 703, 28, 212, 105, 3175, 272, 10020, 76, 665, 44214, 78, 197, 642, 289, 524, 829, 598, 15, 901, 903, 562, 17654, 68718, 968, 141, 996, 935, 1417, 38, 5961, 275, 309, 550, 12, 13, 600, 783, 98, 770, 489, 769, 13223, 137, 12445, 11787, 949, 288, 205, 10191, 429, 7984, 46738, 27205, 89, 10775, 16869, 5915, 77338, 3078, 1585, 103663, 578, 329, 81, 24, 2118, 947, 87827, 100, 832, 24238, 77, 19, 70, 3082, 128, 585, 762, 583, 3083, 322, 10774, 6977, 213, 303, 11216, 654, 311, 510, 5924, 975, 391, 797, 22, 792, 539, 680, 1578, 85, 380, 11645, 2062, 567, 223, 641, 500, 1366, 804, 1580, 805, 857, 111, 424, 807, 11324, 187, 872, 993, 12405, 107, 239, 235, 13475, 1892, 845, 599, 7508, 103, 280, 284, 74643, 24428, 887, 115, 910, 2503, 826, 155, 11778, 1422, 1955, 9552, 961, 238, 962, 37247, 596, 914, 5925, 497, 49051, 990, 10098, 247, 45269, 8587, 121, 963, 11697, 982, 603, 3112, 423, 1124, 2493, 278, 694, 274, 745, 9277, 218, 1091, 1092, 3090, 37165, 117, 629, 576, 630, 7345, 595, 8392, 1480, 862, 627, 110 }; Tmdb api = new Tmdb("APIKey"); //Enter your API key here string[] lines = new string[moviesIds.Length * 23]; int recordId = 1; for (int i = 0; i < moviesIds.Length; i++) { TmdbMovie movie = api.GetMovieInfo(moviesIds[i]); TmdbMovieCast cast = api.GetMovieCast(moviesIds[i]); MovieUtilities movieUtilities = new MovieUtilities(movie, cast); string collectionId_1 = (movie.belongs_to_collection != null) ? movie.belongs_to_collection.id.ToString() : "null"; string budget_2 = movie.budget.ToString(); string genresIds_3 = movieUtilities.GetGenresIds(); string popularity_4 = movie.popularity.ToString(); string productionCompaniesIds_5 = movieUtilities.GetProductionCompaniesIds(); string productionCountriesIso_6 = movieUtilities.GetProductionCountriesIso(); string releaseDate_7 = movie.release_date; string revenue_8 = movie.revenue.ToString(); string runtime_9 = movie.runtime.ToString(); string spokenLanguagesIso_10 = movieUtilities.GetSpokenLanguagesIso(); string voteAverage_11 = movie.vote_average.ToString(); string voteCount_12 = movie.vote_count.ToString(); string castIds_13 = movieUtilities.GetCastIds(8); string costumeMakeUpIds_14 = movieUtilities.GetCostumeMakeUpIds(); string directingIds_15 = movieUtilities.GetDirectingIds(); string cameraIds_16 = movieUtilities.GetCameraIds(); string editingIds_17 = movieUtilities.GetEditingIds(); string productionIds_18 = movieUtilities.GetProductionIds(); string soundIds_19 = movieUtilities.GetSoundIds(); string writingIds_20 = movieUtilities.GetWritingIds(); string artIds_21 = movieUtilities.GetArtIds(); string crewIds_22 = movieUtilities.GetCrewIds(); string visualEffectsIds_23 = movieUtilities.GetVisualEffectsIds(); popularity_4 = popularity_4.Replace(',', '.'); voteAverage_11 = voteAverage_11.Replace(',', '.'); Record record1 = new Record(recordId, i + 1, 1, collectionId_1); lines[recordId - 1] = record1.PrintRecord(); recordId++; Record record2 = new Record(recordId, i + 1, 2, budget_2); lines[recordId - 1] = record2.PrintRecord(); recordId++; Record record3 = new Record(recordId, i + 1, 3, genresIds_3); lines[recordId - 1] = record3.PrintRecord(); recordId++; Record record4 = new Record(recordId, i + 1, 4, popularity_4); lines[recordId - 1] = record4.PrintRecord(); recordId++; Record record5 = new Record(recordId, i + 1, 5, productionCompaniesIds_5); lines[recordId - 1] = record5.PrintRecord(); recordId++; Record record6 = new Record(recordId, i + 1, 6, productionCountriesIso_6); lines[recordId - 1] = record6.PrintRecord(); recordId++; Record record7 = new Record(recordId, i + 1, 7, releaseDate_7); lines[recordId - 1] = record7.PrintRecord(); recordId++; Record record8 = new Record(recordId, i + 1, 8, revenue_8); lines[recordId - 1] = record8.PrintRecord(); recordId++; Record record9 = new Record(recordId, i + 1, 9, runtime_9); lines[recordId - 1] = record9.PrintRecord(); recordId++; Record record10 = new Record(recordId, i + 1, 10, spokenLanguagesIso_10); lines[recordId - 1] = record10.PrintRecord(); recordId++; Record record11 = new Record(recordId, i + 1, 11, voteAverage_11); lines[recordId - 1] = record11.PrintRecord(); recordId++; Record record12 = new Record(recordId, i + 1, 12, voteCount_12); lines[recordId - 1] = record12.PrintRecord(); recordId++; Record record13 = new Record(recordId, i + 1, 13, castIds_13); lines[recordId - 1] = record13.PrintRecord(); recordId++; Record record14 = new Record(recordId, i + 1, 14, costumeMakeUpIds_14); lines[recordId - 1] = record14.PrintRecord(); recordId++; Record record15 = new Record(recordId, i + 1, 15, directingIds_15); lines[recordId - 1] = record15.PrintRecord(); recordId++; Record record16 = new Record(recordId, i + 1, 16, cameraIds_16); lines[recordId - 1] = record16.PrintRecord(); recordId++; Record record17 = new Record(recordId, i + 1, 17, editingIds_17); lines[recordId - 1] = record17.PrintRecord(); recordId++; Record record18 = new Record(recordId, i + 1, 18, productionIds_18); lines[recordId - 1] = record18.PrintRecord(); recordId++; Record record19 = new Record(recordId, i + 1, 19, soundIds_19); lines[recordId - 1] = record19.PrintRecord(); recordId++; Record record20 = new Record(recordId, i + 1, 20, writingIds_20); lines[recordId - 1] = record20.PrintRecord(); recordId++; Record record21 = new Record(recordId, i + 1, 21, artIds_21); lines[recordId - 1] = record21.PrintRecord(); recordId++; Record record22 = new Record(recordId, i + 1, 22, crewIds_22); lines[recordId - 1] = record22.PrintRecord(); recordId++; Record record23 = new Record(recordId, i + 1, 23, visualEffectsIds_23); lines[recordId - 1] = record23.PrintRecord(); recordId++; } File.WriteAllLines("records.txt", lines); }