Exemplo n.º 1
0
        protected override async Task PrepareAsync()
        {
            await base.PrepareAsync();

            //Update filter by adding the user filter to the already loaded filters
            IFilter userFilter = await CertificationHelper.GetUserCertificateFilter(_necessaryMias);

            if (userFilter != null)
            {
                _filter = BooleanCombinationFilter.CombineFilters(BooleanOperator.And, userFilter,
                                                                  BooleanCombinationFilter.CombineFilters(BooleanOperator.And, _filters));
            }
            else
            {
                _filter = BooleanCombinationFilter.CombineFilters(BooleanOperator.And, _filters);
            }

            _defaultScreen    = new MoviesShowItemsScreenData(_genericPlayableItemCreatorDelegate);
            _availableScreens = new List <AbstractScreenData>
            {
                _defaultScreen,
                new MovieFilterByGenreScreenData(),
                new MovieFilterByCollectionScreenData(),
                new VideosFilterByPlayCountScreenData(),
                new MovieFilterByCertificationScreenData(),
                new MovieFilterByActorScreenData(),
                new MovieFilterByCharacterScreenData(),
                new MovieFilterByDirectorScreenData(),
                new MovieFilterByWriterScreenData(),
                new MovieFilterByCompanyScreenData(),
                new VideosFilterByYearScreenData(),
                new VideosFilterBySystemScreenData(),
                new VideosSimpleSearchScreenData(_genericPlayableItemCreatorDelegate),
            };

            _defaultSorting    = new SortByTitle();
            _availableSortings = new List <Sorting.Sorting>
            {
                _defaultSorting,
                new SortBySortTitle(),
                new SortByName(),
                new SortByYear(),
                new VideoSortByFirstGenre(),
                new MovieSortByCertification(),
                new VideoSortByDuration(),
                new VideoSortByFirstActor(),
                new VideoSortByFirstDirector(),
                new VideoSortByFirstWriter(),
                new VideoSortBySize(),
                new VideoSortByAspectRatio(),
                new SortByAddedDate(),
                new SortBySystem(),
            };

            _defaultGrouping    = null;
            _availableGroupings = new List <Sorting.Sorting>
            {
                //_defaultGrouping,
                new SortByTitle(),
                new SortBySortTitle(),
                new SortByName(),
                new SortByYear(),
                new VideoSortByFirstGenre(),
                new MovieSortByCertification(),
                new VideoSortByDuration(),
                new VideoSortByFirstActor(),
                new VideoSortByFirstDirector(),
                new VideoSortByFirstWriter(),
                new VideoSortBySize(),
                new VideoSortByAspectRatio(),
                new SortByAddedDate(),
                new SortBySystem(),
            };
        }
        protected override async Task PrepareAsync()
        {
            await base.PrepareAsync();

            _defaultScreen    = new MoviesShowItemsScreenData(_genericPlayableItemCreatorDelegate);
            _availableScreens = new List <AbstractScreenData>
            {
                _defaultScreen,
                new MovieFilterByGenreScreenData(),
                new MovieFilterByCollectionScreenData(),
                new VideosFilterByPlayCountScreenData(),
                new MovieFilterByCertificationScreenData(),
                new MovieFilterByActorScreenData(),
                new MovieFilterByCharacterScreenData(),
                new MovieFilterByDirectorScreenData(),
                new MovieFilterByWriterScreenData(),
                new MovieFilterByCompanyScreenData(),
                new VideosFilterByYearScreenData(),
                new VideosFilterBySystemScreenData(),
                new VideosSimpleSearchScreenData(_genericPlayableItemCreatorDelegate),
            };

            _defaultSorting    = new SortByTitle();
            _availableSortings = new List <Sorting.Sorting>
            {
                _defaultSorting,
                new SortBySortTitle(),
                new SortByName(),
                new SortByYear(),
                new VideoSortByFirstGenre(),
                new MovieSortByCertification(),
                new VideoSortByDuration(),
                new VideoSortByFirstActor(),
                new VideoSortByFirstDirector(),
                new VideoSortByFirstWriter(),
                new VideoSortBySize(),
                new VideoSortByAspectRatio(),
                new SortByAddedDate(),
                new SortBySystem(),
            };

            _defaultGrouping    = null;
            _availableGroupings = new List <Sorting.Sorting>
            {
                //_defaultGrouping,
                new SortByTitle(),
                new SortBySortTitle(),
                new SortByName(),
                new SortByYear(),
                new VideoSortByFirstGenre(),
                new MovieSortByCertification(),
                new VideoSortByDuration(),
                new VideoSortByFirstActor(),
                new VideoSortByFirstDirector(),
                new VideoSortByFirstWriter(),
                new VideoSortBySize(),
                new VideoSortByAspectRatio(),
                new SortByAddedDate(),
                new SortBySystem(),
            };
        }