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

Sync with Trakt #16

Closed
moallemi opened this issue Oct 3, 2023 · 7 comments · Fixed by #93
Closed

Sync with Trakt #16

moallemi opened this issue Oct 3, 2023 · 7 comments · Fixed by #93
Assignees
Labels
Milestone

Comments

@moallemi
Copy link
Owner

moallemi commented Oct 3, 2023

As a movie and TV show enthusiast,
I want to sync my viewing activity with Trakt
so that I can keep track of movies and episodes I've watched and manage my viewing history seamlessly.

Acceptance Criteria:

  1. Users should be able to link their Trakt account from within the app (icon in home toolbar)
  2. When viewing a movie or episode detail page, there should be a clear indicator showing whether the content has been marked as watched on Trakt.
  3. If the movie or episode has already been marked as watched on Trakt, a button labeled "Mark as Unwatched" should be visible.
  4. If the movie or episode has not been marked as watched on Trakt, a button labeled "Mark as Watched" should be displayed.
  5. Tapping the "Mark as Watched" button should immediately update the Trakt account and reflect the change within the app.
  6. Tapping the "Mark as Unwatched" button should reverse the action, updating both Trakt and the app's interface.
  7. In the event of a sync issue or failure with Trakt, a clear error message should be displayed to the user, indicating the problem.
  8. Any changes made within the app (marking as watched/unwatched) should be reflected in real-time on the user's Trakt account.

Feel free to create separate PRs for this user story

@hadi-norouzi
Copy link
Collaborator

I started working on it.🖐️

@hadi-norouzi
Copy link
Collaborator

hadi-norouzi commented Oct 5, 2023

I implemented login with trakt but I faced some issues.
First of all, we use tmdb for trending movies and shows, they are not from trakt and we do not access movie or show IDs from trakt.
My suggestion is to add trakt APIs like those we have for tmdb and fill traktId filed after that we can use that id for trakt API.
Or we could replace tmdb trending movie and shows with trakt trendings, trakt has tmdb IDs in each movie or show objects.

what is your suggestion? @moallemi

@moallemi
Copy link
Owner Author

moallemi commented Oct 5, 2023

We could consider switching to the Trakt API for all details and lists. I remember using TraktAPI in another project, but I can't recall why I eventually chose TMDB for default.

So I recommend using Trakt ID lookup API to get IDs and fill our data:

@hadi-norouzi
Copy link
Collaborator

I have just confused a little bit.
For now, change TmdbApi to TraktApi or request each row with TraktApi to get Trakt ID for each item?

@vyom198
Copy link

vyom198 commented Oct 6, 2023

I have just confused a little bit. For now, change TmdbApi to TraktApi or request each row with TraktApi to get Trakt ID for each item?

not related to issue , should i have to get new api key from the website because the api key is null in buildconfig class? and when i run the project the mainactivity shows blank screen

@moallemi
Copy link
Owner Author

moallemi commented Oct 6, 2023

I have just confused a little bit. For now, change TmdbApi to TraktApi or request each row with TraktApi to get Trakt ID for each item?

@hadi-norouzi In order to optimize our API calls and ensure efficient performance, I recommend fetching the traktId specifically on the movie/show details screen. This approach ensures that we only retrieve the traktId when it's essential, which is in the detailed screens where we display the watched/unwatched status. By doing so, we can minimize the number of unnecessary API calls to Trakt.

So, when we load movie details from TMDB, we can initiate an asynchronous call to Trakt to obtain the traktId. Once we have that, we can seamlessly fetch the watch/unwatched status and continue with the rest of the required implementation.

@moallemi
Copy link
Owner Author

moallemi commented Oct 6, 2023

not related to issue , should i have to get new api key from the website because the api key is null in buildconfig class? and when i run the project the mainactivity shows blank screen

@vyom198 I Added a section to README file and described how to gain API keys

@moallemi moallemi added the Trakt label Dec 31, 2023
@moallemi moallemi added this to the 1.0.0 milestone Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants