protected virtual bool IsBrandingEquals(Player player, PlayerSearchResult playerIndex)
        {
            if (player.Branding == null)
            {
                LogHelper.Debug("player.Branding is null. Entity:" + player, this);
                return(true);
            }

            return(StringUtil.EqualsIgnoreNullEmpty(player.Branding.AccentColor, playerIndex.AccentColor) &&
                   player.Branding.Chromeless == playerIndex.Chromeless &&
                   player.Branding.DiggSharing == playerIndex.DiggSharing &&
                   player.Branding.EmailSharing == playerIndex.EmailSharing &&
                   player.Branding.EnableErrorScreen == playerIndex.EnableErrorScreen &&
                   player.Branding.FacebookSharing == playerIndex.FacebookSharing &&
                   player.Branding.ShowAdCountdown == playerIndex.ShowAdCountdown &&
                   player.Branding.ShowBitrateButton == playerIndex.ShowBitrateButton &&
                   player.Branding.ShowChannelButton == playerIndex.ShowChannelButton &&
                   player.Branding.ShowEmbedButton == playerIndex.ShowEmbedButton &&
                   player.Branding.ShowEndScreenReplayButton == playerIndex.ShowEndScreenReplayButton &&
                   player.Branding.ShowInfoButton == playerIndex.ShowInfoButton &&
                   player.Branding.ShowInfoScreenDescription == playerIndex.ShowInfoScreenDescription &&
                   player.Branding.ShowInfoScreenHomepageLink == playerIndex.ShowInfoScreenHomepageLink &&
                   player.Branding.ShowInfoScreenTitle == playerIndex.ShowInfoScreenTitle &&
                   player.Branding.ShowShareButton == playerIndex.ShowShareButton &&
                   player.Branding.ShowVolumeButton == playerIndex.ShowVolumeButton &&
                   player.Branding.TwitterSharing == playerIndex.TwitterSharing &&
                   player.Branding.UrlSharing == playerIndex.UrlSharing);
        }
 protected virtual bool IsCommonEquals(Player player, PlayerSearchResult playerIndex)
 {
     return(StringUtil.EqualsIgnoreNullEmpty(player.Id, playerIndex.Id) &&
            StringUtil.EqualsIgnoreNullEmpty(player.DefaultClosedCaptionLanguage, playerIndex.DefaultLanguage) &&
            StringUtil.EqualsIgnoreNullEmpty(player.Name, playerIndex.PlayerName) &&
            StringUtil.EqualsIgnoreNullEmpty(player.ProviderHomepageUrl, playerIndex.ProviderHomepageUrl));
 }
        /// <summary>
        /// Queries the PUBG-web-api for the players with the given ingame names
        /// </summary>
        /// <param name="accountId">Ingame names of the players to be searched for</param>
        /// <returns>Players that match the given ingame names</returns>
        public List <Player> GetPlayersByIngameNames(IEnumerable <string> ingameNames)
        {
            IRestResponse response = this.QueryPlayersEndpoint("filter[playerNames]", ingameNames);

            PlayerSearchResult result = JsonConvert.DeserializeObject <PlayerSearchResult>(response.Content);

            return(result.Data);
        }
        /// <summary>
        /// Queries the PUBG-web-api for the players with the given account ids
        /// </summary>
        /// <param name="accountId">Ids of the players to be searched for</param>
        /// <returns>Players that match the given account ids</returns>
        public List <Player> GetPlayersByAccountIds(IEnumerable <SelectorAccountId> accountIds)
        {
            IRestResponse response = this.QueryPlayersEndpoint("filter[playerIds]", accountIds?.Select(_id => _id.Key));

            PlayerSearchResult result = JsonConvert.DeserializeObject <PlayerSearchResult>(response.Content);

            return(result.Data);
        }
        protected virtual bool IsPlaybackEquals(Player player, PlayerSearchResult playerIndex)
        {
            if (player.Playback == null)
            {
                LogHelper.Debug("player.Playback is null. Entity:" + player, this);
                return(true);
            }

            return(player.Playback.BufferOnPause == playerIndex.BufferOnPause);
        }
        protected virtual bool IsScrubberEquals(Player player, PlayerSearchResult playerIndex)
        {
            if (player.Scrubber == null)
            {
                LogHelper.Debug("player.Scrubber is null. Entity:" + player, this);
                return(true);
            }

            return(player.Scrubber.AlwaysShow == playerIndex.AlwaysShow &&
                   StringUtil.EqualsIgnoreNullEmpty(player.Scrubber.ImageUrl, playerIndex.ScrubberImageUrl));
        }
        protected virtual bool IsWatermarkEquals(Player player, PlayerSearchResult playerIndex)
        {
            if (player.Watermark == null)
            {
                LogHelper.Debug("player.Watermark is null. Entity:" + player, this);
                return(true);
            }

            return(StringUtil.EqualsIgnoreNullEmpty(player.Watermark.Alpha, playerIndex.Alpha) &&
                   StringUtil.EqualsIgnoreNullEmpty(player.Watermark.ImageUrl, playerIndex.WatermarkImageUrl) &&
                   StringUtil.EqualsIgnoreNullEmpty(player.Watermark.ClickUrl, playerIndex.ClickUrl));
        }