コード例 #1
0
        /// <summary>
        /// Update each users rating format, simple/advanced, from trakt.tv
        /// </summary>
        /// <returns></returns>
        private async Task UpdateUserRatingFormat()
        {
            if (Plugin.Instance.Configuration.TraktUsers == null)
            {
                return;
            }

            foreach (var tUser in Plugin.Instance.Configuration.TraktUsers)
            {
                var account = await _traktApi.GetUserAccount(tUser);

                tUser.UsesAdvancedRating = account.Viewing.Ratings.Mode.ToLower() == "advanced";
            }

            Plugin.Instance.SaveConfiguration();
        }