diff options
| author | Ionut Andrei Oanca <oancaionutandrei@gmail.com> | 2020-10-21 15:46:50 +0200 |
|---|---|---|
| committer | Ionut Andrei Oanca <oancaionutandrei@gmail.com> | 2020-10-21 15:46:50 +0200 |
| commit | 93cbf64f884688b667c5403412cb8193dadb251c (patch) | |
| tree | 243495cf8732a14fda47deeabd0922bdb5c2801e /Emby.Server.Implementations/SyncPlay/GroupController.cs | |
| parent | 8819a9d478e6fc11dbfdcff80d9a2dc175953373 (diff) | |
End comments with a period
Diffstat (limited to 'Emby.Server.Implementations/SyncPlay/GroupController.cs')
| -rw-r--r-- | Emby.Server.Implementations/SyncPlay/GroupController.cs | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/Emby.Server.Implementations/SyncPlay/GroupController.cs b/Emby.Server.Implementations/SyncPlay/GroupController.cs index ee2e9eb8f..ff1340e46 100644 --- a/Emby.Server.Implementations/SyncPlay/GroupController.cs +++ b/Emby.Server.Implementations/SyncPlay/GroupController.cs @@ -206,22 +206,22 @@ namespace Emby.Server.Implementations.SyncPlay var items = queue.ToList() .Select(item => _libraryManager.GetItemById(item)); - // Find the highest rating value, which becomes the required minimum for the user + // Find the highest rating value, which becomes the required minimum for the user. var MinParentalRatingAccessRequired = items .Select(item => item.InheritedParentalRatingValue) .Min(); - // Check ParentalRating access, user must have the minimum required access level + // Check ParentalRating access, user must have the minimum required access level. var hasParentalRatingAccess = !user.MaxParentalAgeRating.HasValue || MinParentalRatingAccessRequired <= user.MaxParentalAgeRating; - // Check that user has access to all required folders + // Check that user has access to all required folders. if (!user.HasPermission(PermissionKind.EnableAllFolders) && hasParentalRatingAccess) { - // Get list of items that are not accessible + // Get list of items that are not accessible. var blockedItems = items.Where(item => !HasAccessToItem(user, item)); - // We need the user to be able to access all items + // We need the user to be able to access all items. return !blockedItems.Any(); } @@ -235,14 +235,14 @@ namespace Emby.Server.Implementations.SyncPlay return true; } - // Get list of users + // Get list of users. var users = Participants.Values .Select(participant => _userManager.GetUserById(participant.Session.UserId)); - // Find problematic users + // Find problematic users. var usersWithNoAccess = users.Where(user => !HasAccessToQueue(user, queue)); - // All users must be able to access the queue + // All users must be able to access the queue. return !usersWithNoAccess.Any(); } @@ -268,7 +268,7 @@ namespace Emby.Server.Implementations.SyncPlay RunTimeTicks = session.FullNowPlayingItem.RunTimeTicks ?? 0; PositionTicks = session.PlayState.PositionTicks ?? 0; - // Mantain playstate + // Mantain playstate. var waitingState = new WaitingGroupState(_logger); waitingState.ResumePlaying = !session.PlayState.IsPaused; SetState(waitingState); @@ -503,13 +503,13 @@ namespace Emby.Server.Implementations.SyncPlay /// <inheritdoc /> public bool SetPlayQueue(Guid[] playQueue, int playingItemPosition, long startPositionTicks) { - // Ignore on empty queue or invalid item position + // Ignore on empty queue or invalid item position. if (playQueue.Length < 1 || playingItemPosition >= playQueue.Length || playingItemPosition < 0) { return false; } - // Check is participants can access the new playing queue + // Check is participants can access the new playing queue. if (!AllUsersHaveAccessToQueue(playQueue)) { return false; @@ -577,13 +577,13 @@ namespace Emby.Server.Implementations.SyncPlay /// <inheritdoc /> public bool AddToPlayQueue(Guid[] newItems, string mode) { - // Ignore on empty list + // Ignore on empty list. if (newItems.Length < 1) { return false; } - // Check is participants can access the new playing queue + // Check is participants can access the new playing queue. if (!AllUsersHaveAccessToQueue(newItems)) { return false; @@ -661,7 +661,7 @@ namespace Emby.Server.Implementations.SyncPlay { var currentTime = DateTime.UtcNow; var elapsedTime = currentTime - LastActivity; - // Event may happen during the delay added to account for latency + // Event may happen during the delay added to account for latency. startPositionTicks += elapsedTime.Ticks > 0 ? elapsedTime.Ticks : 0; } |
