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

Unable to import trakt shows with some unknown information #101

Closed
MaarifaMaarifa opened this issue Dec 8, 2023 · 14 comments · Fixed by #103
Closed

Unable to import trakt shows with some unknown information #101

MaarifaMaarifa opened this issue Dec 8, 2023 · 14 comments · Fixed by #103
Labels
bug Something isn't working

Comments

@MaarifaMaarifa
Copy link
Owner

          I was finally able to connect with Trakt.  I went to import and get this error, "trakt api error:trakt api error when deserializing json: unexpected '  "year":null,'    any ideas?

Originally posted by @jeff363b in #77 (comment)

@MaarifaMaarifa
Copy link
Owner Author

MaarifaMaarifa commented Dec 8, 2023

It appears that some of the trakt shows miss their premiere year. Since the program expects this information to be available, it fails to deserialize the received shows' jsons with a missing premiere year field.

@jeff363b
Copy link

jeff363b commented Dec 8, 2023

How do I go about allowing an exception (empty field) so that the import/sync can happen?

@MaarifaMaarifa
Copy link
Owner Author

I'm about to release another version with the patches applied so that such shows should not cause this problem anymore.

@MaarifaMaarifa
Copy link
Owner Author

I have already made a new release. You can try it out and tell me how it goes.

@jeff363b
Copy link

jeff363b commented Dec 8, 2023

It seems to work for the "year", but now it is the "IMDB".....I am guessing that any field with "null" is going to kick back. I was able to view the windows version, but not the docker version yet (need to figure how to update on that device).

@MaarifaMaarifa
Copy link
Owner Author

MaarifaMaarifa commented Dec 8, 2023

Seems like the external ids (i.e imdb, tvdb) for a trakt show json can also be null which surprisingly trakt API docs did not mention. Let me patch this too. I will update the program on crates.io too so that it can be easy to update the docker version.

@MaarifaMaarifa MaarifaMaarifa changed the title Unable to import trakt shows with no premiere year Unable to import trakt shows with some unknown information Dec 8, 2023
@MaarifaMaarifa
Copy link
Owner Author

MaarifaMaarifa commented Dec 8, 2023

I have already made the program handle trakt shows with no external ids. The program will now skip any shows with no IMDB or TVDB id when importing trakt shows as the program will not be able to map these shows to their TvMaze ID.

@MaarifaMaarifa
Copy link
Owner Author

Feel free to reopen this issue if similar problems occur during Trakt shows import.

@jeff363b
Copy link

jeff363b commented Dec 9, 2023

I have tried out the new version and it does not give me any more errors but the import hangs up at about 80%. I have canceled out and tried it numerous times and it seemed to hang up at around 75 to 90%. Not sure what the bottleneck is but it won’t complete. Just a heads up

@MaarifaMaarifa
Copy link
Owner Author

I have tried out the new version and it does not give me any more errors but the import hangs up at about 80%. I have canceled out and tried it numerous times and it seemed to hang up at around 75 to 90%. Not sure what the bottleneck is but it won’t complete. Just a heads up

I'll take a close look at it and provide feedback

@jeff363b
Copy link

jeff363b commented Dec 9, 2023

If it is any help, the import worked on the container version for synology. It would hang up on the Windows version of the app.

Now that it is all imported, it is taking a very long time to show up in the app. The "swirling" icon in the Watchlist and "My Shows" tab keeps going around and around for a long time. it is still swirling. Not sure if there is a hangup there too....Hope this is all helping...

@MaarifaMaarifa
Copy link
Owner Author

If it is any help, the import worked on the container version for synology. It would hang up on the Windows version of the app.

Now that it is all imported, it is taking a very long time to show up in the app. The "swirling" icon in the Watchlist and "My Shows" tab keeps going around and around for a long time. it is still swirling. Not sure if there is a hangup there too....Hope this is all helping...

How many shows were imported from Trakt?

@jeff363b
Copy link

405 were initially attempted. About 8 got rejected due to null data, I believe (no big deal on them as they are over anyways).

@MaarifaMaarifa
Copy link
Owner Author

405 were initially attempted. About 8 got rejected due to null data, I believe (no big deal on them as they are over anyways).

Alright, looks like the program struggles with a large import. The freeze when importing from Trakt is due to sending alot of requests to TvMaze (So as to map trakt shows IDs with TvMaze's) and not properly handling the situation when the rate limit is exceeded when using the TvMaze API which is highly likely to occur with a large import. I'll get this fixed at some point by making the program back off for a few seconds when rate limit is reached, at an expense of a slightly slower import.

Now that it is all imported, it is taking a very long time to show up in the app. The "swirling" icon in the Watchlist and "My Shows" tab keeps going around and around for a long time. it is still swirling. Not sure if there is a hangup there too....Hope this is all helping...

This is still a rate limit problem. When the Watchlist and My Shows Tabs load after an import, the program tries to request the shows items (images, episodes etc) for the first time which with a large import can make the program hit the rate limit. The good thing is that the program caches all of these obtained information to the filesystem meaning that you can quit the program and open it again and the caching process will continue where it left off if the program loads for a long time (you can check the logs to see if caching is running or freezing).

All of these problems will be resolved when i implement proper handling of the rate limit. Hopefully the fixes might land on the next version v0.5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants