California appeals court affirms Weinstein's conviction but orders resentencing