private void Initialize() { if (!Compose()) { return; } try { MovieLibraries = new LazyLibraryList <IMovieLibrary>(CreateList(MovieLibrariesLoaded), ProviderType.Movie); MusicLibraries = new LazyLibraryList <IMusicLibrary>(CreateList(MusicLibrariesLoaded), ProviderType.Music); TVShowLibraries = new LazyLibraryList <ITVShowLibrary>(CreateList(TVShowLibrariesLoaded), ProviderType.TVShow); PictureLibraries = new LazyLibraryList <IPictureLibrary>(CreateList(PictureLibrariesLoaded), ProviderType.Picture); FileSystemLibraries = new LazyLibraryList <IFileSystemLibrary>(CreateList(FileSystemLibrariesLoaded), ProviderType.Filesystem); PlaylistLibraries = new LazyLibraryList <IPlaylistLibrary>(CreateList(PlaylistLibrariesLoaded), ProviderType.Playlist); } catch (Exception ex) { Log.Error("Failed to load MAS backends", ex); } }
internal ProviderHandler() { if (!Compose()) { return; } try { MovieLibraries = new LazyLibraryList <IMovieLibrary>(FilterDisabled(MovieLibrariesLoaded).ToDictionary(x => (int)x.Metadata["Id"], x => x), ProviderType.Movie); MusicLibraries = new LazyLibraryList <IMusicLibrary>(FilterDisabled(MusicLibrariesLoaded).ToDictionary(x => (int)x.Metadata["Id"], x => x), ProviderType.Music); TVShowLibraries = new LazyLibraryList <ITVShowLibrary>(FilterDisabled(TVShowLibrariesLoaded).ToDictionary(x => (int)x.Metadata["Id"], x => x), ProviderType.TVShow); PictureLibraries = new LazyLibraryList <IPictureLibrary>(FilterDisabled(PictureLibrariesLoaded).ToDictionary(x => (int)x.Metadata["Id"], x => x), ProviderType.Picture); FileSystemLibraries = new LazyLibraryList <IFileSystemLibrary>(FilterDisabled(FileSystemLibrariesLoaded).ToDictionary(x => (int)x.Metadata["Id"], x => x), ProviderType.Filesystem); } catch (Exception ex) { Log.Error("Failed to load MAS backends", ex); } Instance = this; }