public static DBSourceMovieInfo GetOrCreate(DBMovieInfo movie, DBSourceInfo source) { DBSourceMovieInfo rtn = Get(movie, source); if (rtn != null) { return(rtn); } rtn = new DBSourceMovieInfo(); rtn.Movie = movie; rtn.Source = source; // if this is the IMDb data source, populate the id with the imdb_id field if (rtn.ScriptID == 874902 && !string.IsNullOrEmpty(movie.ImdbID) && movie.ImdbID.Trim().Length == 9) { rtn.Identifier = movie.ImdbID; } movie.SourceMovieInfo.Add(rtn); return(rtn); }
public DBSourceMovieInfo GetSourceMovieInfo(DBSourceInfo source) { return(DBSourceMovieInfo.GetOrCreate(this, source)); }
public DBSourceMovieInfo GetSourceMovieInfo(int scriptID) { return(DBSourceMovieInfo.GetOrCreate(this, scriptID)); }
public static DBSourceMovieInfo GetOrCreate(DBMovieInfo movie, DBSourceInfo source) { DBSourceMovieInfo rtn = Get(movie, source); if (rtn != null) return rtn; rtn = new DBSourceMovieInfo(); rtn.Movie = movie; rtn.Source = source; // if this is the IMDb data source, populate the id with the imdb_id field if (rtn.ScriptID == 874902 && movie.ImdbID.Trim().Length == 9) rtn.Identifier = movie.ImdbID; movie.SourceMovieInfo.Add(rtn); return rtn; }