private void loadProvidersFromDatabase() { logger.Info("Loading existing data sources..."); foreach (DBSourceInfo currSource in DBSourceInfo.GetAll()) { updateListsWith(currSource); } detailSources.Sort(sorters[DataType.DETAILS]); coverSources.Sort(sorters[DataType.COVERS]); backdropSources.Sort(sorters[DataType.BACKDROPS]); }
private void loadProvidersFromDatabase() { logger.Info("Loading existing data sources..."); foreach (DBSourceInfo currSource in DBSourceInfo.GetAll()) { logger.Debug("*** loadProvidersFromDatabase: " + currSource); updateListsWith(currSource); } trackDetailSources.Sort(sorters[DataType.TRACKDETAIL]); artistDetailSources.Sort(sorters[DataType.ARTISTDETAIL]); albumDetailSources.Sort(sorters[DataType.ALBUMDETAIL]); albumArtSources.Sort(sorters[DataType.ALBUMART]); artistArtSources.Sort(sorters[DataType.ARTISTART]); trackArtSources.Sort(sorters[DataType.TRACKART]); }
/// <summary> /// returns the tmdb id for a movie if its exists /// </summary> private string getTmdbId(DBMovieInfo movie) { // get source info, maybe already have it from poster or movieinfo var tmdbSource = DBSourceInfo.GetAll().Find(s => s.ToString() == "themoviedb.org"); if (tmdbSource == null) { return(null); } string id = movie.GetSourceMovieInfo(tmdbSource).Identifier; if (id == null || id.Trim() == string.Empty) { return(null); } return(id); }
private static DBSourceInfo GetTmdbSourceInfo() { return(DBSourceInfo.GetAll().Find(s => s.ToString() == "themoviedb.org")); }