예제 #1
0
        public UserPolicy()
        {
            EnableLiveTvManagement    = true;
            EnableMediaPlayback       = true;
            EnableLiveTvAccess        = true;
            EnableSharedDeviceControl = true;

            BlockedTags       = new string[] { };
            BlockUnratedItems = new UnratedItem[] { };

            EnableUserPreferenceAccess = true;

            AccessSchedules = new AccessSchedule[] { };

            EnableAllChannels = true;
            EnabledChannels   = new string[] { };

            EnableAllFolders = true;
            EnabledFolders   = new string[] { };

            EnabledDevices   = new string[] { };
            EnableAllDevices = true;

            EnableContentDownloading = true;
        }
예제 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="UserConfiguration" /> class.
        /// </summary>
        public UserConfiguration()
        {
            PlayDefaultAudioTrack     = true;
            EnableLiveTvManagement    = true;
            EnableMediaPlayback       = true;
            EnableLiveTvAccess        = true;
            EnableSharedDeviceControl = true;

            LatestItemsExcludes        = new string[] { };
            OrderedViews               = new string[] { };
            BlockedMediaFolders        = new string[] { };
            DisplayChannelsWithinViews = new string[] { };
            BlockedTags       = new string[] { };
            BlockedChannels   = new string[] { };
            BlockUnratedItems = new UnratedItem[] { };

            ExcludeFoldersFromGrouping = new string[] { };
            DisplayCollectionsView     = true;

            IncludeTrailersInSuggestions = true;
            EnableCinemaMode             = true;
            EnableUserPreferenceAccess   = true;

            AccessSchedules = new AccessSchedule[] { };
        }
예제 #3
0
        private bool IsParentalScheduleAllowed(AccessSchedule schedule, DateTime date)
        {
            if (date.Kind != DateTimeKind.Utc)
            {
                throw new ArgumentException("Utc date expected");
            }

            var localTime = date.ToLocalTime();

            return(localTime.DayOfWeek == schedule.DayOfWeek && IsWithinTime(schedule, localTime));
        }
예제 #4
0
        public UserPolicy()
        {
            EnableContentDeletion            = true;
            EnableContentDeletionFromFolders = Array.Empty <string>();

            EnableSyncTranscoding = true;
            EnableMediaConversion = true;

            EnableMediaPlayback            = true;
            EnableAudioPlaybackTranscoding = true;
            EnableVideoPlaybackTranscoding = true;
            EnablePlaybackRemuxing         = true;

            EnableLiveTvManagement = true;
            EnableLiveTvAccess     = true;

            // Without this on by default, admins won't be able to do this
            // Improve in the future
            EnableLiveTvManagement = true;

            EnableSharedDeviceControl = true;

            BlockedTags       = Array.Empty <string>();
            BlockUnratedItems = new UnratedItem[] { };

            EnableUserPreferenceAccess = true;

            AccessSchedules = new AccessSchedule[] { };

            EnableAllChannels = true;
            EnabledChannels   = Array.Empty <string>();

            EnableAllFolders = true;
            EnabledFolders   = Array.Empty <string>();

            EnabledDevices   = Array.Empty <string>();
            EnableAllDevices = true;

            EnableContentDownloading = true;
            EnablePublicSharing      = true;
            EnableRemoteAccess       = true;
        }
예제 #5
0
        private bool IsWithinTime(AccessSchedule schedule, DateTime localTime)
        {
            var hour = localTime.TimeOfDay.TotalHours;

            return(hour >= schedule.StartHour && hour <= schedule.EndHour);
        }
예제 #6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="UserConfiguration" /> class.
        /// </summary>
        public UserConfiguration()
        {
            PlayDefaultAudioTrack = true;
            EnableLiveTvManagement = true;
            EnableMediaPlayback = true;
            EnableLiveTvAccess = true;
            EnableSharedDeviceControl = true;

            LatestItemsExcludes = new string[] { };
            OrderedViews = new string[] { };
            BlockedMediaFolders = new string[] { };
            DisplayChannelsWithinViews = new string[] { };
            BlockedTags = new string[] { };
            BlockedChannels = new string[] { };
            BlockUnratedItems = new UnratedItem[] { };

            ExcludeFoldersFromGrouping = new string[] { };
            DisplayCollectionsView = true;

            SyncConnectName = true;
            SyncConnectImage = true;
            IncludeTrailersInSuggestions = true;
            EnableCinemaMode = true;
            EnableUserPreferenceAccess = true;

            AccessSchedules = new AccessSchedule[] { };
        }