internal static void FollowUser(TraktUser user) { var followUserThread = new Thread(obj => { var currUser = obj as TraktUser; var response = TraktAPI.TraktAPI.NetworkFollowUser(currUser.Username); TraktLogger.LogTraktResponse<TraktNetworkApproval>(response); // notify user if follow is pending approval by user // approved date will be null if user is marked as private if (response != null && response.ApprovedAt == null) { GUIUtils.ShowNotifyDialog(Translation.Follow, string.Format(Translation.FollowPendingApproval, currUser.Username)); } }) { IsBackground = true, Name = "FollowUser" }; followUserThread.Start(user); }
internal static void SetUserProperties(TraktUser user) { SetProperty("#Trakt.User.About", user.About.RemapHighOrderChars()); SetProperty("#Trakt.User.Age", user.Age); SetProperty("#Trakt.User.Avatar", user.Avatar); SetProperty("#Trakt.User.AvatarFileName", user.AvatarFilename); SetProperty("#Trakt.User.FullName", user.FullName); SetProperty("#Trakt.User.Gender", user.Gender); SetProperty("#Trakt.User.JoinDate", user.JoinDate.FromEpoch().ToLongDateString()); SetProperty("#Trakt.User.Location", user.Location); SetProperty("#Trakt.User.Protected", user.Protected); SetProperty("#Trakt.User.Url", user.Url); SetProperty("#Trakt.User.Username", user.Username); SetProperty("#Trakt.User.VIP", user.VIP.ToString()); }
private void UnfollowUser(TraktUser user) { var unfollowUserThread = new Thread(objUser => { TraktAPI.TraktAPI.NetworkUnFollowUser((objUser as TraktUser).Username); }) { IsBackground = true, Name = "UnfollowUser" }; unfollowUserThread.Start(user); }