Ejemplo n.º 1
0
        protected override void Prepare()
        {
            base.Prepare();

            AbstractItemsScreenData.PlayableItemCreatorDelegate picd = mi => new RecordingItem(mi)
            {
                Command = new MethodDelegateCommand(() => PlayItemsModel.CheckQueryPlayAction(mi))
            };

            _defaultScreen    = new VideosShowItemsScreenData(picd);
            _availableScreens = new List <AbstractScreenData>
            {
                _defaultScreen,
                new RecordingFilterByNameScreenData(),
                new RecordingsFilterByChannelScreenData(),
                //new VideosFilterByActorScreenData(),
                //new VideosFilterByDirectorScreenData(),
                //new VideosFilterByWriterScreenData(),
                //new VideosFilterByGenreScreenData(),
                //new VideosFilterByYearScreenData(),
                //new VideosFilterBySystemScreenData(),
                new VideosSimpleSearchScreenData(picd),
            };

            _defaultSorting    = new SortByRecordingDateDesc();
            _availableSortings = new List <Sorting>
            {
                _defaultSorting,
                new SortByTitle(),
                //new VideoSortByFirstGenre(),
                //new VideoSortByDuration(),
                //new VideoSortByFirstActor(),
                //new VideoSortByFirstDirector(),
                //new VideoSortByFirstWriter(),
                //new VideoSortBySize(),
                //new VideoSortByAspectRatio(),
                //new SortBySystem(),
            };

            var optionalMias = new[]
            {
                MovieAspect.ASPECT_ID,
                SeriesAspect.ASPECT_ID,
                AudioAspect.ASPECT_ID,
                VideoAspect.ASPECT_ID,
                ImageAspect.ASPECT_ID
            }.Union(MediaNavigationModel.GetMediaSkinOptionalMIATypes(MediaNavigationMode));

            _customRootViewSpecification = new StackingViewSpecification(_viewName, null, _necessaryMias, optionalMias, true)
            {
                MaxNumItems = Consts.MAX_NUM_ITEMS_VISIBLE
            };
        }
        protected override async Task PrepareAsync()
        {
            await base.PrepareAsync();

            _defaultScreen    = new VideosShowItemsScreenData(_genericPlayableItemCreatorDelegate);
            _availableScreens = new List <AbstractScreenData>
            {
                _defaultScreen,
                new VideosFilterByGenreScreenData(),
                new VideosFilterByLanguageScreenData(),
                new VideosFilterByActorScreenData(),
                new VideosFilterByCharacterScreenData(),
                new VideosFilterByDirectorScreenData(),
                new VideosFilterByWriterScreenData(),
                new VideosFilterByYearScreenData(),
                new VideosFilterBySystemScreenData(),
                new VideosSimpleSearchScreenData(_genericPlayableItemCreatorDelegate),
            };

            _defaultSorting    = new SortByTitle();
            _availableSortings = new List <Sorting.Sorting>
            {
                _defaultSorting,
                new SortByYear(),
                new VideoSortByFirstGenre(),
                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 SortByYear(),
                new VideoSortByFirstGenre(),
                new VideoSortByDuration(),
                new VideoSortByFirstActor(),
                new VideoSortByFirstDirector(),
                new VideoSortByFirstWriter(),
                new VideoSortBySize(),
                new VideoSortByAspectRatio(),
                new SortByAddedDate(),
            };
        }