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

Cannot make the sync to work #73

Open
vikdean opened this issue Jan 8, 2025 · 6 comments
Open

Cannot make the sync to work #73

vikdean opened this issue Jan 8, 2025 · 6 comments

Comments

@vikdean
Copy link

vikdean commented Jan 8, 2025

I'd like to ask for some help, because I cannot make the sync work. I've followed every instruction to a T.

  • The IMDB section seems to be working fine; it knows how many ratings I have: "msg":"downloaded ratings","count":3159
  • The Trakt session also seem to be working, because it displays what it would add and what it would remove. (I'm using 'add-only' mode)

However, at the end it doesn't work, nothing gets added and there are no error messages either.

Here is a log from the sync function:

{"time":"2025-01-08T21:22:58.037795481Z","level":"INFO","source":{"function":"github.com/cecobask/imdb-trakt-sync/pkg/client.(*IMDbClient).hydrate","file":"/home/runner/work/imdb-trakt-sync/imdb-trakt-sync/pkg/client/imdb.go","line":217},"msg":"hydrated imdb client","username":"myusername","userID":"id_redacted","watchlistID":"ls000798348","lists":[]}
{"time":"2025-01-08T21:23:01.310748769Z","level":"INFO","source":{"function":"github.com/cecobask/imdb-trakt-sync/internal/syncer.(*Syncer).Sync","file":"/home/runner/work/imdb-trakt-sync/imdb-trakt-sync/internal/syncer/syncer.go","line":62},"msg":"sync started"}
{"time":"2025-01-08T21:23:09.501894557Z","level":"INFO","source":{"function":"github.com/cecobask/imdb-trakt-sync/pkg/client.(*IMDbClient).RatingsExport","file":"/home/runner/work/imdb-trakt-sync/imdb-trakt-sync/pkg/client/imdb.go","line":285},"msg":"exported ratings"}
{"time":"2025-01-08T21:23:11.796731978Z","level":"INFO","source":{"function":"github.com/cecobask/imdb-trakt-sync/pkg/client.(*IMDbClient).waitExportsReady","file":"/home/runner/work/imdb-trakt-sync/imdb-trakt-sync/pkg/client/imdb.go","line":420},"msg":"waiting 15s before reloading exports tab to check the latest status","attempt":1}
...
{"time":"2025-01-08T21:26:10.244468578Z","level":"INFO","source":{"function":"github.com/cecobask/imdb-trakt-sync/pkg/client.(*IMDbClient).waitExportsReady","file":"/home/runner/work/imdb-trakt-sync/imdb-trakt-sync/pkg/client/imdb.go","line":417},"msg":"exports are ready for download","ids":["id"],"count":1}
{"time":"2025-01-08T21:26:10.5113677Z","level":"INFO","source":{"function":"github.com/cecobask/imdb-trakt-sync/pkg/client.(*IMDbClient).ratingsDownload","file":"/home/runner/work/imdb-trakt-sync/imdb-trakt-sync/pkg/client/imdb.go","line":314},"msg":"downloaded ratings","count":3159}
{"time":"2025-01-08T21:26:10.51190509Z","level":"INFO","source":{"function":"github.com/cecobask/imdb-trakt-sync/internal/syncer.(*Syncer).syncLists","file":"/home/runner/work/imdb-trakt-sync/imdb-trakt-sync/internal/syncer/syncer.go","line":178},"msg":"skipping watchlist sync"}
{"time":"2025-01-08T21:26:10.655392597Z","level":"INFO","source":{"function":"github.com/cecobask/imdb-trakt-sync/pkg/client.(*TraktClient).RatingsAdd","file":"/home/runner/work/imdb-trakt-sync/imdb-trakt-sync/pkg/client/trakt.go","line":590},"msg":"synced trakt ratings","ratings":{"added":{"movies":1,"shows":2},"not_found":{ --- redacted, would be too long]}}}
{"time":"2025-01-08T21:26:10.655445455Z","level":"INFO","source":{"function":"github.com/cecobask/imdb-trakt-sync/internal/syncer.(*Syncer).syncRatings","file":"/home/runner/work/imdb-trakt-sync/imdb-trakt-sync/internal/syncer/syncer.go","line":253},"msg":"sync mode *** would have deleted 209 trakt rating item(s)"," --- redacted, it would have been too long}
{"time":"2025-01-08T21:26:10.655925288Z","level":"INFO","source":{"function":"github.com/cecobask/imdb-trakt-sync/internal/syncer.(*Syncer).syncHistory","file":"/home/runner/work/imdb-trakt-sync/imdb-trakt-sync/internal/syncer/syncer.go","line":269},"msg":"skipping history sync"}
{"time":"2025-01-08T21:26:10.655946778Z","level":"INFO","source":{"function":"github.com/cecobask/imdb-trakt-sync/internal/syncer.(*Syncer).Sync","file":"/home/runner/work/imdb-trakt-sync/imdb-trakt-sync/internal/syncer/syncer.go","line":79},"msg":"sync completed"}``` 
@cecobask
Copy link
Owner

cecobask commented Jan 9, 2025

Hi @vikdean, please clarify the following:

  1. Do you have any lists on IMDb?
  2. If the answer to the previous question is yes, would you like all your IMDb lists to get synced to Trakt?
  3. Would you mind sharing your full configuration, excluding sensitive data?
  4. Did your ratings sync successfully? The logs indicate that the syncer added 1 movie and 2 show ratings to Trakt.

Based on the information I have, it looks like your ratings were synced correctly. However, the syncer hasn't found any lists on your IMDb account, hence it's not syncing lists. The default behaviour when it comes to lists is to find and sync all lists from IMDb, if you haven't specified any lists in the IMDB_LISTS secret.

@vikdean
Copy link
Author

vikdean commented Jan 9, 2025

  1. No, I dont
  2. I've set everything to "false" except Ratings, thats all I care about
  3. I'm using the GitHub actions method, these are the variables I have set:
  • IMDB_AUTH
  • IMDB_COOKIEATMAIN
  • IMDB_COOKIEUBIDMAIN
  • IMDB_EMAIL
  • IMDB_PASSWORD
  • SYNC_HISTORY
  • SYNC_MODE
  • SYNC_RATINGS
  • SYNC_TIMEOUT
  • SYNC_WATCHLIST
  • TRAKT_CLIENTID
  • TRAKT_CLIENTSECRET
  • TRAKT_EMAIL
  • TRAKT_PASSWORD
  1. No, it didn't add any ratings, thats the issue.

@cecobask
Copy link
Owner

cecobask commented Jan 9, 2025

I tried to reproduce your issue locally, but everything seemed to work fine for me.
This could be related to misconfiguration, but it could be an edge case that I haven't thought of.
Either way, it can be hard to debug this without knowing the values for your configuration.
I would be more than happy to assist you if you're willing to screen share. Please don't post any sensitive data here.
Feel free to ping me at any of my contact options here: https://cecobask.com

@vikdean
Copy link
Author

vikdean commented Jan 9, 2025

I can share the relevant settings, its not a problem, since we know that both IMDB and Trakt works. So the credentials part is not relevant.

- IMDB_AUTH: cookies
- IMDB_COOKIEATMAIN: <cookie data>
- IMDB_COOKIEUBIDMAIN: <cookie data>
- IMDB_EMAIL: <my IMDB email>
- IMDB_PASSWORD: <my IMDB password>
- SYNC_HISTORY: false
- SYNC_MODE: add-only
- SYNC_RATINGS: true
- SYNC_TIMEOUT: 30m
- SYNC_WATCHLIST: false
- TRAKT_CLIENTID: <my client id>
- TRAKT_CLIENTSECRET: <my client secret>
- TRAKT_EMAIL: <my Trakt email>
- TRAKT_PASSWORD: <my Trakt password>

Trakt app settings:
image

image

@cecobask
Copy link
Owner

cecobask commented Jan 9, 2025

I tried that exact same configuration when trying to reproduce the issue, but it worked fine for me.
I'm still around now. If you're free, we can sync up and fix it together?

@vikdean
Copy link
Author

vikdean commented Jan 9, 2025

Sure, lets continue with email then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants