Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong type assignment for lists #61

Closed
TheUltimateC0der opened this issue Dec 17, 2018 · 1 comment
Closed

Wrong type assignment for lists #61

TheUltimateC0der opened this issue Dec 17, 2018 · 1 comment

Comments

@TheUltimateC0der
Copy link

I was implementing the TraktClient.Users.AddCustomListItemsAsync function as mentioned in the documentation. After debugging 3 hours at 2 in the morning, i finally downloaded the code to debug the lib also. Found out that your statement was wrong.

_listItemsPost.Movies = new List<TraktUserCustomListItemsPostMovie>();

_listItemsPost.Movies = new List<TraktUserCustomListItemsPostMovie>(); should actually be _listItemsPost.Movies = new List<ITraktUserCustomListItemsPostMovie>();

That is why the cast here doesnt work

(_listItemsPost.Movies as List<ITraktUserCustomListItemsPostMovie>)?.Add(
and no items get added to the list.

You already did this for the People list

TraktApiSharp: 1.0.0-alpha3

@henrikfroehling
Copy link
Owner

henrikfroehling commented Dec 17, 2018

Resolved with d256742

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

2 participants