Exemplo n.º 1
0
        public static DBSourceMusicVideoInfo Get(DBTrackInfo mv, DBSourceInfo source)
        {
            foreach (DBSourceMusicVideoInfo currInfo in mv.SourceMusicVideoInfo)
            {
                if (currInfo.Source == source)
                {
                    return(currInfo);
                }
            }

            return(null);
        }
Exemplo n.º 2
0
        public static DBSourceMusicVideoInfo GetOrCreate(DBTrackInfo mv, DBSourceInfo source)
        {
            DBSourceMusicVideoInfo rtn = Get(mv, source);

            if (rtn != null)
            {
                return(rtn);
            }

            rtn            = new DBSourceMusicVideoInfo();
            rtn.musicvideo = mv;
            rtn.Source     = source;

            // if this is the IMDb data source, populate the id with the imdb_id field
//            if (rtn.ScriptID == 874902 && mv.ImdbID.Trim().Length == 9)
//                rtn.Identifier = mv.ImdbID;

            mv.SourceMusicVideoInfo.Add(rtn);
            return(rtn);
        }
Exemplo n.º 3
0
 public DBSourceMusicVideoInfo GetSourceMusicVideoInfo(DBSourceInfo source)
 {
     return(DBSourceMusicVideoInfo.GetOrCreate(this, source));
 }