Inheritance: MovingPicturesDBTable
Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 public DBSourceMovieInfo GetSourceMovieInfo(DBSourceInfo source)
 {
     return(DBSourceMovieInfo.GetOrCreate(this, source));
 }
Esempio n. 3
0
 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;
        }