public static DBSourceMusicVideoInfo Get(DBTrackInfo mv, DBSourceInfo source) { foreach (DBSourceMusicVideoInfo currInfo in mv.SourceMusicVideoInfo) { if (currInfo.Source == source) { return(currInfo); } } return(null); }
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); }
public DBSourceMusicVideoInfo GetSourceMusicVideoInfo(DBSourceInfo source) { return(DBSourceMusicVideoInfo.GetOrCreate(this, source)); }