public WebMediaServiceDescription GetServiceDescription() { return(new WebMediaServiceDescription() { MovieApiVersion = MOVIE_API, MusicApiVersion = MUSIC_API, PicturesApiVersion = PICTURES_API, TvShowsApiVersion = TVSHOWS_API, FilesystemApiVersion = FILESYSTEM_API, ServiceVersion = VersionUtil.GetVersionName(), AvailableFileSystemLibraries = FileSystemLibraries.GetAllAsBackendProvider(), AvailableMovieLibraries = MovieLibraries.GetAllAsBackendProvider(), AvailableMusicLibraries = MusicLibraries.GetAllAsBackendProvider(), AvailablePictureLibraries = PictureLibraries.GetAllAsBackendProvider(), AvailableTvShowLibraries = TVShowLibraries.GetAllAsBackendProvider(), DefaultFileSystemLibrary = ProviderHandler.GetDefaultProvider(ProviderType.Filesystem), DefaultMovieLibrary = ProviderHandler.GetDefaultProvider(ProviderType.Movie), DefaultMusicLibrary = ProviderHandler.GetDefaultProvider(ProviderType.Music), DefaultPictureLibrary = ProviderHandler.GetDefaultProvider(ProviderType.Picture), DefaultTvShowLibrary = ProviderHandler.GetDefaultProvider(ProviderType.TVShow), }); }
public IList <WebSearchResult> Search(string text) { return(MovieLibraries.SearchAll(text).AsQueryable() .Concat(MusicLibraries.SearchAll(text).AsQueryable()) .Concat(PictureLibraries.SearchAll(text).AsQueryable()) .Concat(TVShowLibraries.SearchAll(text).AsQueryable()) .Concat(FileSystemLibraries.SearchAll(text).AsQueryable()) .OrderByDescending(x => x.Score) .ToList()); }