Beispiel #1
0
        protected override async Task PrepareAsync()
        {
            await base.PrepareAsync();

            _defaultScreen = new LocalMediaNavigationScreenData(_genericPlayableItemCreatorDelegate);

            // Dynamic screens remain null - browse media states don't provide dynamic filters
            _availableScreens = null;

            _defaultSorting    = new BrowseDefaultSorting();
            _availableSortings = new List <Sorting.Sorting>
            {
                _defaultSorting,
                new SortByTitle(),
                new SortByDate(),
                new SortByAddedDate(),
                // We could offer sortings here which are specific for one media item type but which will cope with all three item types (and sort items of the three types in a defined order)
            };

            _defaultGrouping    = null;
            _availableGroupings = new List <Sorting.Sorting>
            {
                //_defaultGrouping,
                new SortByTitle(),
                new SortByDate(),
                new SortByAddedDate(),
            };

            var optionalMias = Consts.OPTIONAL_LOCAL_BROWSING_MIAS
                               .Union(MediaNavigationModel.GetMediaSkinOptionalMIATypes(MediaNavigationMode));

            _customRootViewSpecification = new AddedRemovableMediaViewSpecificationFacade(
                new LocalMediaRootProxyViewSpecification(_viewName, _necessaryMias, optionalMias));
        }
        protected override void Prepare()
        {
            base.Prepare();

            _defaultScreen = new LocalMediaNavigationScreenData(_genericPlayableItemCreatorDelegate);

            // Dynamic screens remain null - browse media states don't provide dynamic filters
            _availableScreens = null;

            _defaultSorting    = new BrowseDefaultSorting();
            _availableSortings = new List <Sorting.Sorting>
            {
                _defaultSorting,
                new SortByTitle(),
                new SortByDate(),
                // We could offer sortings here which are specific for one media item type but which will cope with all three item types (and sort items of the three types in a defined order)
            };

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

            _customRootViewSpecification = new AddedRemovableMediaViewSpecificationFacade(
                new LocalMediaRootProxyViewSpecification(_viewName, _necessaryMias, optionalMias));
        }