public void LoadMyData() { try { nfoFileType nfofiletype = nfoFileType.Unknown; MyDataInfo = nfoHelper.LoadNfoFile(CurrentMoviePath, out nfofiletype); LoadedNfoFileType = nfoFileType.Unknown; LoadedNfoFileType = nfofiletype; m_IsNFoInfoMissing = MyDataInfo == null || MyDataInfo.IsEmpty; if (LoadedNfoFileType != nfoFileType.Unknown) { Loggy.Logger.Debug("nfo loaded for " + CurrentMoviePath); } if (MyDataInfo != null) { if (MyDataInfo.MediaInfo != null && MediaInfo != null) { // be smart. if the detected mediainfo has new items not present in the .nfo file, use them PatchMediainfo(MyDataInfo.MediaInfo); MediaInfo = MyDataInfo.MediaInfo; } } // load metadata and select it if present this.MetadataInfo = MoviesheetsUpdateManager.CreateManagerForMovie(CurrentMoviePath).GetMovieInfo(); if (this.MetadataInfo != null) { if (this.MetadataInfo.MediaInfo != null && MediaInfo != null) { // be smart. if the detected mediainfo has new items not present in the .nfo file, use them PatchMediainfo(MetadataInfo.MediaInfo); MediaInfo = MetadataInfo.MediaInfo; } } m_IsMetadataInfoMissing = this.MetadataInfo == null || this.MetadataInfo.IsEmpty; // apply imdbinfo to the my own nfo collector if (MyDataInfo != null) { this.MyDataInfo = ApplyIMDbMovieInfoBehaviour(this.MyDataInfo, this.IMDBInfo); } this.SelectInfoSourceByPriority(); } catch (Exception ex) { try { Loggy.Logger.DebugException("Load nfo:", ex); } catch { /*needed for designtime*/ } } }
public ImagesProcessor(string moviePath) { MoviePath = moviePath; IsMyOwnThumbnailFromDiskImageRequired = false; Backdrops = new List <BackdropBase>(); OwnBackdrops = new List <BackdropBase>(); string _metadataFilename = FileManager.Configuration.GetMoviesheetMetadataPath(MoviePath, false); if (!string.IsNullOrEmpty(_metadataFilename) && File.Exists(_metadataFilename)) { MetadataManager = MoviesheetsUpdateManager.CreateManagerForMovie(MoviePath); } string _spareMetadataFilename = FileManager.Configuration.GetParentFolderMetadataPath(MoviePath, false); if (!string.IsNullOrEmpty(_spareMetadataFilename) && File.Exists(_spareMetadataFilename)) { SpareMetadataManager = MoviesheetsUpdateManager.CreateManagerForParentFolder(MoviePath); } }