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

Incorrect "days watched" value in AniDroid user profiles #9

Open
Rainyan opened this issue Feb 21, 2023 · 1 comment
Open

Incorrect "days watched" value in AniDroid user profiles #9

Rainyan opened this issue Feb 21, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Rainyan
Copy link

Rainyan commented Feb 21, 2023

Hi, first of all thanks for the great app. I've noticed a bug as follows:

AniDroid is displaying an incorrect "X days watched" value in users' profile pages.

Here is a screenshot (not my user profile, but this is replicable for all profiles with sufficiently large watch time values) from in-app, showing "61.4 days":

AniDroid screenshot

And here is the same data, accessed from a browser at https://anilist.co/user/1:

daysWatched

Here's a GraphQL query that reproduces this behaviour:

{
  User(id: 1) {
    siteUrl
    # Deprecated
    stats {
      watchedTime
    }
    # Should use this, instead
    statistics {
      anime {
        minutesWatched
      }
    }
  }
}

which outputs:

{
  "data": {
    "User": {
      "siteUrl": "https://anilist.co/user/1",
      "stats": {
        "watchedTime": 88410
      },
      "statistics": {
        "anime": {
          "minutesWatched": 91850
        }
      }
    }
  }
}

with 88410 / 60 / 24 ≈ 61.4 days (incorrect value from the deprecated API)
and 91850 / 60 / 24 ≈ 63.8 days (correct value from the newer API)

@danejur
Copy link
Owner

danejur commented Feb 21, 2023

Good call-out! I'll update the User call to make use of those new fields. Thanks!

@danejur danejur added the bug Something isn't working label Feb 21, 2023
@danejur danejur self-assigned this Feb 21, 2023
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

No branches or pull requests

2 participants