IgnisDa / ryot

Roll your own tracker!
https://ryot.io
GNU General Public License v3.0
1.99k stars 55 forks source link

Trakt import throwing errors on dockerized instance #892

Closed Ardakilic closed 4 months ago

Ardakilic commented 4 months ago

Hello,

I'm trying to import my trakt history to ryot.

However, I'm having difficulties, it throws an error to stdout:

ryot  | [backend] 2024-07-01T22:50:25.998383Z ERROR start_importing{user_id="usr_6nWPCr436u9p"}: ryot::importer: Error { message: "error decoding response body: missing field `id` at line 1 column 100", extensions: None }

My trakt.tv username is arda.

I'm running this on Debian VPS, using docker compose with latest image tag (ghcr.io/ignisda/ryot:latest).

Currently the import continues with High CPU consumption and I have encountered once again, but I have not encountered the issue for the fourth time. This is too random.

--

Additionally, this may be a dumb question, but I wanted to make sure before doing something stupid:

What happens when we trigger a second import from trakt.tv ?

Let's say I want to update my history with my recent updates, which are on Trakt, but not on Ryot.

if I trigger an import from Trakt to Ryot after a while, will it double-scrobble my old history over my current one, or will it get only the missing difference from the current DB?

Thanks in advance!

IgnisDa commented 4 months ago

My trakt.tv username is arda.

I was able to import this account's data fine. Can you run with RUST_LOG=ryot=debug and try again?

What happens when we trigger a second import from trakt.tv ?

DO NOT DO THIS!!! Here is the beginning of the importing docs:

image

Once you are done with trakt import, you'd setup an integration with Trakt. Here is the tracing issue: https://github.com/IgnisDa/ryot/issues/875. Seems like you are already aware of it.

Ardakilic commented 4 months ago

Thank you @IgnisDa for the update, and proper reply, much appreciated.

I checked, and my huge library got imported a couple of hours later, with a log like this:

[
    {
        "lot": "MOVIE",
        "step": "MEDIA_DETAILS_FROM_PROVIDER",
        "identifier": "207921",
        "error": "error decoding response body: missing field `id` at line 1 column 100"
    },
    {
        "lot": "MOVIE",
        "step": "MEDIA_DETAILS_FROM_PROVIDER",
        "identifier": "438376",
        "error": "error decoding response body: missing field `id` at line 1 column 100"
    },
    {
        "lot": "MOVIE",
        "step": "MEDIA_DETAILS_FROM_PROVIDER",
        "identifier": "259799",
        "error": "error decoding response body: missing field `id` at line 1 column 100"
    }
]

I don't care about the media details, but I hope these are imported. Is there any way for me to confirm, or is this expected and normal?

IgnisDa commented 4 months ago

Nope everything that shows up in the failed logs were not able to be imported. But you can easily import them manually. Just visit https://trakt.tv/movies/<identifier> (replace movies with shows if needed) and then using the name of the movie, mark it as watched.

Example https://trakt.tv/movies/207921 redirects to power rangers movie.

IgnisDa commented 4 months ago

Closing since this is expected as mentioned in the docs. Importing with 100% success is not really feasible. There are too many edge cases to account for.