Esempio n. 1
0
File: User.cs Progetto: Cyrre/Emby
        private bool IsWithinTime(AccessSchedule schedule, DateTime localTime)
        {
            var hour = localTime.TimeOfDay.TotalHours;

            return hour >= schedule.StartHour && hour <= schedule.EndHour;
        }
Esempio n. 2
0
        public UserPolicy()
        {
            EnableSync = true;
            EnableSyncTranscoding = true;

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

            EnableLiveTvManagement = 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;
            EnablePublicSharing = true;
        }
Esempio n. 3
0
File: User.cs Progetto: Cyrre/Emby
        private bool IsParentalScheduleAllowed(AccessSchedule schedule, DateTime date)
        {
            if (date.Kind != DateTimeKind.Utc)
            {
                throw new ArgumentException("Utc date expected");
            }

            var localTime = date.ToLocalTime();

            return DayOfWeekHelper.GetDaysOfWeek(schedule.DayOfWeek).Contains(localTime.DayOfWeek) &&
                IsWithinTime(schedule, localTime);
        }
Esempio n. 4
0
        public UserPolicy()
        {
            EnableSync = true;
            EnableSyncTranscoding = true;

            EnableMediaPlayback = true;
            EnableAudioPlaybackTranscoding = true;
            EnableVideoPlaybackTranscoding = 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 = 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;
            EnablePublicSharing = true;
        }