本文整理汇总了C#中MediaPortal.Plugins.MovingPictures.Database.DBMovieInfo.IsFullyPopulated方法的典型用法代码示例。如果您正苦于以下问题:C# DBMovieInfo.IsFullyPopulated方法的具体用法?C# DBMovieInfo.IsFullyPopulated怎么用?C# DBMovieInfo.IsFullyPopulated使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MediaPortal.Plugins.MovingPictures.Database.DBMovieInfo
的用法示例。
在下文中一共展示了DBMovieInfo.IsFullyPopulated方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Update
public void Update(DBMovieInfo movie)
{
List<DBSourceInfo> sources;
lock (detailSources) sources = new List<DBSourceInfo>(detailSources);
// unlock the movie fields for the first iteration
movie.ProtectExistingValuesFromCopy(false);
// first update from the primary source of this data
int providerCount = 0;
if (movie.PrimarySource != null && movie.PrimarySource.Provider != null) {
UpdateResults success = movie.PrimarySource.Provider.Update(movie);
logger.Debug("UPDATE: Title='{0}', Provider='{1}', Version={2}, Result={3}", movie.Title, movie.PrimarySource.Provider.Name, movie.PrimarySource.Provider.Version, success.ToString());
providerCount++;
}
foreach (DBSourceInfo currSource in sources) {
if (movie.IsFullyPopulated()) {
logger.Debug("UPDATE: All fields are populated. Done updating '" + movie.Title + "'.");
break;
}
if (currSource.IsDisabled(DataType.DETAILS))
continue;
if (currSource == movie.PrimarySource)
continue;
providerCount++;
if (providerCount <= MovingPicturesCore.Settings.DataProviderRequestLimit || MovingPicturesCore.Settings.DataProviderRequestLimit == 0) {
UpdateResults success = currSource.Provider.Update(movie);
logger.Debug("UPDATE: Title='{0}', Provider='{1}', Version={2}, Result={3}", movie.Title, currSource.Provider.Name, currSource.Provider.Version, success.ToString());
}
else {
// stop update
break;
}
if (MovingPicturesCore.Settings.UseTranslator) {
movie.Translate();
}
}
}