Example #1
0
        public SettingsViewModel(Config.WebMediaPortal model)
        {
            Platforms = Configuration.StreamingPlatforms
                        .Select(x => new PlatformViewModel()
            {
                Name = x.Name
            })
                        .ToList();

            Skin              = model.Skin;
            Language          = model.DefaultLanguage;
            StreamType        = (StreamTypeWithDescription)model.StreamType;
            EnableDeinterlace = model.EnableDeinterlace;
            EnableAlbumPlayer = model.EnableAlbumPlayer;
            SelectedGroup     = model.DefaultGroup;
            MusicLayout       = (MusicLayoutTypeWithDescription)model.MusicLayout;

            if (ShowMASConfiguration)
            {
                var serviceDesc = Connections.Current.MAS.GetServiceDescription();
                MovieProvider  = GetCurrentProvider(model.MovieProvider, serviceDesc.DefaultMovieLibrary);
                MusicProvider  = GetCurrentProvider(model.MusicProvider, serviceDesc.DefaultMusicLibrary);
                TVShowProvider = GetCurrentProvider(model.TVShowProvider, serviceDesc.DefaultTvShowLibrary);
            }
        }
Example #2
0
        public SettingsViewModel(Config.WebMediaPortal model)
        {
            Skin                 = model.Skin;
            Language             = model.DefaultLanguage;
            StreamType           = (StreamTypeWithDescription)model.StreamType;
            EnableDeinterlace    = model.EnableDeinterlace;
            EnableAlbumPlayer    = model.EnableAlbumPlayer;
            SelectedGroup        = model.DefaultGroup;
            SelectedMediaProfile = model.DefaultMediaProfile;
            SelectedAudioProfile = model.DefaultAudioProfile;
            SelectedTVProfile    = model.DefaultTVProfile;

            if (ShowMASConfiguration)
            {
                var serviceDesc = Connections.Current.MAS.GetServiceDescription();
                MovieProvider  = GetCurrentProvider(model.MovieProvider, serviceDesc.DefaultMovieLibrary);
                MusicProvider  = GetCurrentProvider(model.MusicProvider, serviceDesc.DefaultMusicLibrary);
                TVShowProvider = GetCurrentProvider(model.TVShowProvider, serviceDesc.DefaultTvShowLibrary);
            }
        }